Embedded Template Library 1.0
Loading...
Searching...
No Matches
type_def.h
Go to the documentation of this file.
1
2
3/******************************************************************************
4The MIT License(MIT)
5
6Embedded Template Library.
7https://github.com/ETLCPP/etl
8https://www.etlcpp.com
9
10Copyright(c) 2016 John Wellbelove
11
12Permission is hereby granted, free of charge, to any person obtaining a copy
13of this software and associated documentation files(the "Software"), to deal
14in the Software without restriction, including without limitation the rights
15to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
16copies of the Software, and to permit persons to whom the Software is
17furnished to do so, subject to the following conditions :
18
19The above copyright notice and this permission notice shall be included in all
20copies or substantial portions of the Software.
21
22THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
25AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28SOFTWARE.
29******************************************************************************/
30
31#ifndef ETL_TYPE_DEF_INCLUDED
32#define ETL_TYPE_DEF_INCLUDED
33
34#include "platform.h"
35#include "type_traits.h"
36
37namespace etl
38{
39#define ETL_TYPEDEF(T, name) \
40 class name##_tag; \
41 typedef etl::type_def<name##_tag, T> name
42#define ETL_USING(name, T) \
43 class name##_tag; \
44 typedef etl::type_def<name##_tag, T> name
45
46#if ETL_USING_CPP11
47 #define ETL_TYPE_DEF_RETURN(T, TValue, TReturn) typename etl::enable_if<etl::is_convertible<T, TValue>::value, TReturn>::type
48#else
49 #define ETL_TYPE_DEF_RETURN(T, TValue, ReturnType) ReturnType
50#endif
51
52 //*************************************************************************
65 //*************************************************************************
66 template <typename TIdType, typename TValue>
67 class type_def
68 {
69 public:
70
71 typedef TValue type;
72 typedef TValue value_type;
73 typedef TIdType id_type;
74
75 //*********************************************************************
76 ETL_CONSTEXPR type_def() ETL_NOEXCEPT
77 : value(TValue())
78 {
79 }
80
81 //*********************************************************************
82#if ETL_USING_CPP11
83 template <typename T, typename = typename etl::enable_if< etl::is_convertible<T, TValue>::value, void>::type>
84#else
85 template <typename T>
86#endif
87 ETL_CONSTEXPR type_def(T value_) ETL_NOEXCEPT
88 : value(static_cast<TValue>(value_))
89 {
90 }
91
92 //*********************************************************************
93#if ETL_USING_CPP11
94 ETL_CONSTEXPR type_def(const type_def& other) = default;
95#endif
96
97 //*********************************************************************
98 ETL_CONSTEXPR operator TValue() const ETL_NOEXCEPT
99 {
100 return value;
101 }
102
103 //*********************************************************************
104 ETL_CONSTEXPR14 type_def& operator++() ETL_NOEXCEPT
105 {
106 ++value;
107 return *this;
108 }
109
110 //*********************************************************************
111 ETL_CONSTEXPR14 type_def operator++(int) ETL_NOEXCEPT
112 {
113 type_def temp(*this);
114 type_def::operator++();
115 return temp;
116 }
117
118 //*********************************************************************
119 ETL_CONSTEXPR14 type_def& operator--() ETL_NOEXCEPT
120 {
121 --value;
122 return *this;
123 }
124
125 //*********************************************************************
126 ETL_CONSTEXPR14 type_def operator--(int) ETL_NOEXCEPT
127 {
128 type_def temp(*this);
129 type_def::operator--();
130 return temp;
131 }
132
133 //*********************************************************************
134 template <typename T>
135 ETL_CONSTEXPR14 ETL_TYPE_DEF_RETURN(T, TValue, type_def&) operator+=(T rhs)ETL_NOEXCEPT
136 {
137 value += static_cast<TValue>(rhs);
138 return *this;
139 }
140
141 //*********************************************************************
142 ETL_CONSTEXPR14 type_def& operator+=(const type_def& rhs) ETL_NOEXCEPT
143 {
144 value += rhs.value;
145 return *this;
146 }
147
148 //*********************************************************************
149 template <typename T>
150 ETL_CONSTEXPR14 ETL_TYPE_DEF_RETURN(T, TValue, type_def&) operator-=(T rhs)ETL_NOEXCEPT
151 {
152 value -= static_cast<TValue>(rhs);
153 return *this;
154 }
155
156 //*********************************************************************
157 ETL_CONSTEXPR14 type_def& operator-=(const type_def& rhs) ETL_NOEXCEPT
158 {
159 value -= rhs.value;
160 return *this;
161 }
162
163 //*********************************************************************
164 template <typename T>
165 ETL_CONSTEXPR14 ETL_TYPE_DEF_RETURN(T, TValue, type_def&) operator*=(T rhs)ETL_NOEXCEPT
166 {
167 value *= static_cast<TValue>(rhs);
168 return *this;
169 }
170
171 //*********************************************************************
172 ETL_CONSTEXPR14 type_def& operator*=(const type_def& rhs) ETL_NOEXCEPT
173 {
174 value *= rhs.value;
175 return *this;
176 }
177
178 //*********************************************************************
179 template <typename T>
180 ETL_CONSTEXPR14 ETL_TYPE_DEF_RETURN(T, TValue, type_def&) operator/=(T rhs)ETL_NOEXCEPT
181 {
182 value /= static_cast<TValue>(rhs);
183 return *this;
184 }
185
186 //*********************************************************************
187 ETL_CONSTEXPR14 type_def& operator/=(const type_def& rhs) ETL_NOEXCEPT
188 {
189 value /= rhs.value;
190 return *this;
191 }
192
193 //*********************************************************************
194 template <typename T>
195 ETL_CONSTEXPR14 ETL_TYPE_DEF_RETURN(T, TValue, type_def&) operator%=(T rhs)ETL_NOEXCEPT
196 {
197 value %= static_cast<TValue>(rhs);
198 return *this;
199 }
200
201 //*********************************************************************
202 ETL_CONSTEXPR14 type_def& operator%=(const type_def& rhs) ETL_NOEXCEPT
203 {
204 value %= rhs.value;
205 return *this;
206 }
207
208 //*********************************************************************
209 template <typename T>
210 ETL_CONSTEXPR14 ETL_TYPE_DEF_RETURN(T, TValue, type_def&) operator&=(T rhs)ETL_NOEXCEPT
211 {
212 value &= static_cast<TValue>(rhs);
213 return *this;
214 }
215
216 //*********************************************************************
217 ETL_CONSTEXPR14 type_def& operator&=(const type_def& rhs) ETL_NOEXCEPT
218 {
219 value &= rhs.value;
220 return *this;
221 }
222
223 //*********************************************************************
224 template <typename T>
225 ETL_CONSTEXPR14 ETL_TYPE_DEF_RETURN(T, TValue, type_def&) operator|=(T rhs)ETL_NOEXCEPT
226 {
227 value |= static_cast<TValue>(rhs);
228 return *this;
229 }
230
231 //*********************************************************************
232 ETL_CONSTEXPR14 type_def& operator|=(const type_def& rhs) ETL_NOEXCEPT
233 {
234 value |= rhs.value;
235 return *this;
236 }
237
238 //*********************************************************************
239 template <typename T>
240 ETL_CONSTEXPR14 ETL_TYPE_DEF_RETURN(T, TValue, type_def&) operator^=(T rhs)ETL_NOEXCEPT
241 {
242 value ^= static_cast<TValue>(rhs);
243 return *this;
244 }
245
246 //*********************************************************************
247 ETL_CONSTEXPR14 type_def& operator^=(const type_def& rhs) ETL_NOEXCEPT
248 {
249 value ^= rhs.value;
250 return *this;
251 }
252
253 //*********************************************************************
254 template <typename T>
255 ETL_CONSTEXPR14 typename etl::enable_if<etl::is_integral<T>::value, type_def&>::type operator<<=(T rhs) ETL_NOEXCEPT
256 {
257 value <<= static_cast<TValue>(rhs);
258 return *this;
259 }
260
261 //*********************************************************************
262 template <typename T>
263 ETL_CONSTEXPR14 typename etl::enable_if<etl::is_integral<T>::value, type_def&>::type operator>>=(T rhs) ETL_NOEXCEPT
264 {
265 value >>= static_cast<TValue>(rhs);
266 return *this;
267 }
268
269 //*********************************************************************
270#if ETL_USING_CPP11
271 ETL_CONSTEXPR14 type_def& operator=(const type_def& rhs) = default;
272#endif
273
274 //*********************************************************************
275 TValue& get() ETL_NOEXCEPT
276 {
277 return value;
278 }
279
280 //*********************************************************************
281 ETL_CONSTEXPR const TValue& get() const ETL_NOEXCEPT
282 {
283 return value;
284 }
285
286 //*********************************************************************
287 // + operator
288 //*********************************************************************
289 template <typename T>
290 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator+(const type_def & lhs, T rhs) ETL_NOEXCEPT
291 {
292 return type_def(lhs.value + static_cast<TValue>(rhs));
293 }
294
295 //*********************************************************************
296 template <typename T>
297 friend ETL_CONSTEXPR type_def operator+(T lhs, const type_def& rhs) ETL_NOEXCEPT
298 {
299 return type_def(static_cast<TValue>(lhs) + rhs.value);
300 }
301
302 //*********************************************************************
303 friend ETL_CONSTEXPR type_def operator+(const type_def& lhs, const type_def& rhs)
304 {
305 return type_def(lhs.value + rhs.value);
306 }
307
308 //*********************************************************************
309 // - operator
310 //*********************************************************************
311 template <typename T>
312 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator-(const type_def & lhs, T rhs) ETL_NOEXCEPT
313 {
314 return type_def(lhs.value - static_cast<TValue>(rhs));
315 }
316
317 //*********************************************************************
318 template <typename T>
319 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator-(T lhs, const type_def & rhs) ETL_NOEXCEPT
320 {
321 return type_def(static_cast<TValue>(lhs) - rhs.value);
322 }
323
324 //*********************************************************************
325 friend ETL_CONSTEXPR type_def operator-(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
326 {
327 return type_def(lhs.value - rhs.value);
328 }
329
330 //*********************************************************************
331 // * operator
332 //*********************************************************************
333 template <typename T>
334 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator*(const type_def & lhs, T rhs) ETL_NOEXCEPT
335 {
336 return type_def(lhs.value * static_cast<TValue>(rhs));
337 }
338
339 //*********************************************************************
340 template <typename T>
341 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator*(T lhs, const type_def & rhs) ETL_NOEXCEPT
342 {
343 return type_def(static_cast<TValue>(lhs) * rhs.value);
344 }
345
346 //*********************************************************************
347 friend ETL_CONSTEXPR type_def operator*(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
348 {
349 return type_def(lhs.value * rhs.value);
350 }
351
352 //*********************************************************************
353 // / operator
354 //*********************************************************************
355 template <typename T>
356 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator/(const type_def & lhs, T rhs) ETL_NOEXCEPT
357 {
358 return type_def(lhs.value / static_cast<TValue>(rhs));
359 }
360
361 //*********************************************************************
362 template <typename T>
363 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator/(T lhs, const type_def & rhs) ETL_NOEXCEPT
364 {
365 return type_def(static_cast<TValue>(lhs) / rhs.value);
366 }
367
368 //*********************************************************************
369 friend ETL_CONSTEXPR type_def operator/(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
370 {
371 return type_def(lhs.value / rhs.value);
372 }
373
374 //*********************************************************************
375 template <typename T>
376 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator%(const type_def & lhs, T rhs) ETL_NOEXCEPT
377 {
378 return type_def(lhs.value % static_cast<TValue>(rhs));
379 }
380
381 //*********************************************************************
382 // % operator
383 //*********************************************************************
384 template <typename T>
385 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator%(T lhs, const type_def & rhs) ETL_NOEXCEPT
386 {
387 return type_def(static_cast<TValue>(lhs) % rhs.value);
388 }
389
390 //*********************************************************************
391 friend ETL_CONSTEXPR type_def operator%(const type_def& lhs, const type_def& rhs)
392 {
393 return type_def(lhs.value % rhs.value);
394 }
395
396 //*********************************************************************
397 // & operator
398 //*********************************************************************
399 template <typename T>
400 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator&(const type_def & lhs, T rhs) ETL_NOEXCEPT
401 {
402 return type_def(lhs.value & static_cast<TValue>(rhs));
403 }
404
405 //*********************************************************************
406 template <typename T>
407 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator&(T lhs, const type_def & rhs) ETL_NOEXCEPT
408 {
409 return type_def(static_cast<TValue>(lhs) & rhs.value);
410 }
411
412 //*********************************************************************
413 friend ETL_CONSTEXPR type_def operator&(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
414 {
415 return type_def(lhs.value & rhs.value);
416 }
417
418 //*********************************************************************
419 // | operator
420 //*********************************************************************
421 template <typename T>
422 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator|(const type_def & lhs, T rhs) ETL_NOEXCEPT
423 {
424 return type_def(lhs.value | static_cast<TValue>(rhs));
425 }
426
427 //*********************************************************************
428 template <typename T>
429 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator|(T lhs, const type_def & rhs) ETL_NOEXCEPT
430 {
431 return type_def(static_cast<TValue>(lhs) | rhs.value);
432 }
433
434 //*********************************************************************
435 friend ETL_CONSTEXPR type_def operator|(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
436 {
437 return type_def(lhs.value | rhs.value);
438 }
439
440 //*********************************************************************
441 // ^ operator
442 //*********************************************************************
443 template <typename T>
444 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator^(const type_def & lhs, T rhs) ETL_NOEXCEPT
445 {
446 return type_def(lhs.value ^ static_cast<TValue>(rhs));
447 }
448
449 //*********************************************************************
450 template <typename T>
451 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, type_def) operator^(T lhs, const type_def & rhs) ETL_NOEXCEPT
452 {
453 return type_def(static_cast<TValue>(lhs) ^ rhs.value);
454 }
455
456 //*********************************************************************
457 friend ETL_CONSTEXPR type_def operator^(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
458 {
459 return type_def(lhs.value ^ rhs.value);
460 }
461
462 //*********************************************************************
463 // << operator
464 //*********************************************************************
465 template <typename T>
466 friend ETL_CONSTEXPR typename etl::enable_if<etl::is_integral<T>::value, type_def>::type operator<<(const type_def& lhs, T rhs) ETL_NOEXCEPT
467 {
468 return type_def(lhs.value << static_cast<TValue>(rhs));
469 }
470
471 //*********************************************************************
472 template <typename T>
473 friend ETL_CONSTEXPR typename etl::enable_if< (etl::is_integral<T>::value && etl::is_integral<TValue>::value), T>::type
474 operator<<(T lhs, const type_def& rhs) ETL_NOEXCEPT
475 {
476 return lhs << rhs.value;
477 }
478
479 //*********************************************************************
480 // >> operator
481 //*********************************************************************
482 template <typename T>
483 friend ETL_CONSTEXPR typename etl::enable_if<etl::is_integral<T>::value, type_def>::type operator>>(const type_def& lhs, T rhs) ETL_NOEXCEPT
484 {
485 return type_def(lhs.value >> static_cast<TValue>(rhs));
486 }
487
488 //*********************************************************************
489 template <typename T>
490 friend ETL_CONSTEXPR typename etl::enable_if< (etl::is_integral<T>::value && etl::is_integral<TValue>::value), T>::type
491 operator>>(T lhs, const type_def& rhs) ETL_NOEXCEPT
492 {
493 return lhs >> rhs.value;
494 }
495
496 //*********************************************************************
497 // < operator
498 //*********************************************************************
499 template <typename T>
500 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator<(const type_def & lhs, T rhs) ETL_NOEXCEPT
501 {
502 return lhs.value < rhs;
503 }
504
505 //*********************************************************************
506 template <typename T>
507 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator<(T lhs, const type_def & rhs) ETL_NOEXCEPT
508 {
509 return lhs < rhs.value;
510 }
511
512 //*********************************************************************
513 friend ETL_CONSTEXPR bool operator<(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
514 {
515 return lhs.value < rhs.value;
516 }
517
518 //*********************************************************************
519 // <= operator
520 //*********************************************************************
521 template <typename T>
522 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator<=(const type_def & lhs, T rhs) ETL_NOEXCEPT
523 {
524 return lhs.value <= rhs;
525 }
526
527 //*********************************************************************
528 template <typename T>
529 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator<=(T lhs, const type_def & rhs) ETL_NOEXCEPT
530 {
531 return lhs <= rhs.value;
532 }
533
534 //*********************************************************************
535 friend ETL_CONSTEXPR bool operator<=(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
536 {
537 return lhs.value <= rhs.value;
538 }
539
540 //*********************************************************************
541 // > operator
542 //*********************************************************************
543 template <typename T>
544 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator>(const type_def & lhs, T rhs) ETL_NOEXCEPT
545 {
546 return lhs.value > rhs;
547 }
548
549 //*********************************************************************
550 template <typename T>
551 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator>(T lhs, const type_def & rhs) ETL_NOEXCEPT
552 {
553 return lhs > rhs.value;
554 }
555
556 //*********************************************************************
557 friend ETL_CONSTEXPR bool operator>(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
558 {
559 return lhs.value > rhs.value;
560 }
561
562 //*********************************************************************
563 // >= operator
564 //*********************************************************************
565 template <typename T>
566 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator>=(const type_def & lhs, T rhs) ETL_NOEXCEPT
567 {
568 return lhs.value >= rhs;
569 }
570
571 //*********************************************************************
572 template <typename T>
573 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator>=(T lhs, const type_def & rhs) ETL_NOEXCEPT
574 {
575 return lhs >= rhs.value;
576 }
577
578 //*********************************************************************
579 friend ETL_CONSTEXPR bool operator>=(const type_def& lhs, const type_def& rhs)
580 {
581 return lhs.value >= rhs.value;
582 }
583
584 //*********************************************************************
585 // == operator
586 //*********************************************************************
587 template <typename T>
588 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator==(const type_def & lhs, T rhs) ETL_NOEXCEPT
589 {
590 return lhs.value == rhs;
591 }
592
593 //*********************************************************************
594 template <typename T>
595 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator==(T lhs, const type_def & rhs)
596 {
597 return lhs == rhs.value;
598 }
599
600 //*********************************************************************
601 friend ETL_CONSTEXPR bool operator==(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
602 {
603 return lhs.value == rhs.value;
604 }
605
606 //*********************************************************************
607 // != operator
608 //*********************************************************************
609 template <typename T>
610 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator!=(const type_def & lhs, T rhs) ETL_NOEXCEPT
611 {
612 return lhs.value != rhs;
613 }
614
615 //*********************************************************************
616 template <typename T>
617 friend ETL_CONSTEXPR ETL_TYPE_DEF_RETURN(T, TValue, bool) operator!=(T lhs, const type_def & rhs) ETL_NOEXCEPT
618 {
619 return lhs != rhs.value;
620 }
621
622 //*********************************************************************
623 friend ETL_CONSTEXPR bool operator!=(const type_def& lhs, const type_def& rhs) ETL_NOEXCEPT
624 {
625 return lhs.value != rhs.value;
626 }
627
628 private:
629
630 TValue value;
631 };
632} // namespace etl
633
634#undef ETL_TYPE_DEF_RETURN
635
636#endif
bitset_ext
Definition absolute.h:40
ETL_CONSTEXPR14 bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1081
std::basic_ostream< T, std::char_traits< T > > & operator<<(std::basic_ostream< T, std::char_traits< T > > &os, const etl::ibasic_string< T > &str)
Definition basic_string.h:3213
ETL_CONSTEXPR14 etl::circular_iterator< TIterator > operator-(etl::circular_iterator< TIterator > &lhs, typename etl::iterator_traits< TIterator >::difference_type offset)
Definition circular_iterator.h:675
bool operator>(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1133
etl::byte & operator^=(etl::byte &lhs, etl::byte rhs)
Exclusive or equals.
Definition byte.h:290
etl::enable_if< etl::is_integral< TInteger >::value, etl::byte & >::type operator<<=(etl::byte &b, TInteger shift)
Shift left equals.
Definition byte.h:229
etl::byte operator|(etl::byte lhs, etl::byte rhs)
Or.
Definition byte.h:250
ETL_CONSTEXPR14 enable_if<!etl::is_specialization< TRep2, etl::chrono::duration >::value, etl::chrono::duration< typenameetl::common_type< TRep1, TRep2 >::type, TPeriod1 > >::type operator/(const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const TRep2 &rhs) ETL_NOEXCEPT
Operator /.
Definition duration.h:570
etl::byte & operator|=(etl::byte &lhs, etl::byte rhs)
Or equals.
Definition byte.h:274
ETL_CONSTEXPR14 etl::chrono::duration< typename etl::common_type< TRep1, TRep2 >::type, TPeriod1 > operator%(const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const TRep2 &rhs) ETL_NOEXCEPT
Operator %.
Definition duration.h:600
etl::byte operator&(etl::byte lhs, etl::byte rhs)
And.
Definition byte.h:258
bool operator>=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1147
etl::enable_if< etl::is_integral< TInteger >::value, etl::byte >::type operator>>(etl::byte b, TInteger shift)
Shift right.
Definition byte.h:220
ETL_CONSTEXPR14 bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1093
etl::byte operator^(etl::byte lhs, etl::byte rhs)
Exclusive Or.
Definition byte.h:266
etl::enable_if< etl::is_integral< TInteger >::value, etl::byte & >::type operator>>=(etl::byte &b, TInteger shift)
Shift right equals.
Definition byte.h:240
ETL_CONSTEXPR14 enable_if<!etl::is_specialization< TRep2, etl::chrono::duration >::value, etl::chrono::duration< typenameetl::common_type< TRep1, TRep2 >::type, TPeriod1 > >::type operator*(const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const TRep2 &rhs) ETL_NOEXCEPT
Operator *.
Definition duration.h:541
ETL_CONSTEXPR14 etl::circular_iterator< TIterator > operator+(etl::circular_iterator< TIterator > &lhs, typename etl::iterator_traits< TIterator >::difference_type offset)
Definition circular_iterator.h:662
etl::byte & operator&=(etl::byte &lhs, etl::byte rhs)
And equals.
Definition byte.h:282
T & get(array< T, Size > &a)
Definition array.h:1161
bool operator<(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1106
bool operator<=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1120