62 typedef TValue value_type;
63 typedef TIdType id_type;
66 ETL_CONSTEXPR type_def() ETL_NOEXCEPT
73 template <typename T, typename = typename etl::enable_if<etl::is_convertible<T, TValue>::value,
void>::type>
77 ETL_CONSTEXPR type_def(T value_) ETL_NOEXCEPT
84 ETL_CONSTEXPR type_def(
const type_def& other) =
default;
88 ETL_CONSTEXPR
operator TValue()
const ETL_NOEXCEPT
94 ETL_CONSTEXPR14 type_def& operator ++() ETL_NOEXCEPT
101 ETL_CONSTEXPR14 type_def operator ++(
int) ETL_NOEXCEPT
103 type_def temp(*
this);
104 type_def::operator ++();
109 ETL_CONSTEXPR14 type_def& operator --() ETL_NOEXCEPT
116 ETL_CONSTEXPR14 type_def operator --(
int) ETL_NOEXCEPT
118 type_def temp(*
this);
119 type_def::operator --();
124 template <
typename T>
131 operator +=(T rhs) ETL_NOEXCEPT
139 type_def& operator +=(
const type_def& rhs) ETL_NOEXCEPT
146 template <
typename T>
153 operator -=(T rhs) ETL_NOEXCEPT
160 ETL_CONSTEXPR14 type_def& operator -=(
const type_def& rhs) ETL_NOEXCEPT
167 template <
typename T>
174 operator *=(T rhs) ETL_NOEXCEPT
181 ETL_CONSTEXPR14 type_def& operator *=(
const type_def& rhs) ETL_NOEXCEPT
188 template <
typename T>
195 operator /=(T rhs) ETL_NOEXCEPT
202 ETL_CONSTEXPR14 type_def& operator /=(
const type_def& rhs) ETL_NOEXCEPT
209 template <
typename T>
216 operator %=(T rhs) ETL_NOEXCEPT
223 ETL_CONSTEXPR14 type_def& operator %=(
const type_def& rhs) ETL_NOEXCEPT
230 template <
typename T>
237 operator &=(T rhs) ETL_NOEXCEPT
244 ETL_CONSTEXPR14 type_def& operator &=(
const type_def& rhs) ETL_NOEXCEPT
251 template <
typename T>
258 operator |=(T rhs) ETL_NOEXCEPT
265 ETL_CONSTEXPR14 type_def& operator |=(
const type_def& rhs) ETL_NOEXCEPT
272 template <
typename T>
279 operator ^=(T rhs) ETL_NOEXCEPT
286 ETL_CONSTEXPR14 type_def& operator ^=(
const type_def& rhs) ETL_NOEXCEPT
293 template <
typename T>
295 operator <<=(T rhs) ETL_NOEXCEPT
302 template <
typename T>
304 operator >>=(T rhs) ETL_NOEXCEPT
312 ETL_CONSTEXPR14 type_def& operator =(
const type_def& rhs) =
default;
316 TValue& get() ETL_NOEXCEPT
322 ETL_CONSTEXPR
const TValue& get()
const ETL_NOEXCEPT
330 template <
typename T>
337 operator +(
const type_def& lhs, T rhs) ETL_NOEXCEPT
339 return type_def(lhs.value + rhs);
343 template <
typename T>
344 friend ETL_CONSTEXPR type_def operator +(T lhs,
const type_def& rhs) ETL_NOEXCEPT
346 return type_def(lhs + rhs.value);
350 friend ETL_CONSTEXPR type_def operator +(
const type_def& lhs,
const type_def& rhs)
352 return type_def(lhs.value + rhs.value);
358 template <
typename T>
365 operator -(
const type_def& lhs, T rhs) ETL_NOEXCEPT
367 return type_def(lhs.value - rhs);
371 template <
typename T>
378 operator -(T lhs,
const type_def& rhs) ETL_NOEXCEPT
380 return type_def(lhs - rhs.value);
384 friend ETL_CONSTEXPR type_def operator -(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
386 return type_def(lhs.value - rhs.value);
392 template <
typename T>
399 operator *(
const type_def& lhs, T rhs) ETL_NOEXCEPT
401 return type_def(lhs.value * rhs);
405 template <
typename T>
412 operator *(T lhs,
const type_def& rhs) ETL_NOEXCEPT
414 return type_def(lhs * rhs.value);
418 friend ETL_CONSTEXPR type_def operator *(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
420 return type_def(lhs.value * rhs.value);
426 template <
typename T>
433 operator /(
const type_def& lhs, T rhs) ETL_NOEXCEPT
435 return type_def(lhs.value / rhs);
439 template <
typename T>
446 operator /(T lhs,
const type_def& rhs) ETL_NOEXCEPT
448 return type_def(lhs / rhs.value);
452 friend ETL_CONSTEXPR type_def operator /(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
454 return type_def(lhs.value / rhs.value);
458 template <
typename T>
465 operator %(
const type_def& lhs, T rhs) ETL_NOEXCEPT
467 return type_def(lhs.value % rhs);
473 template <
typename T>
480 operator %(T lhs,
const type_def& rhs) ETL_NOEXCEPT
482 return type_def(lhs % rhs.value);
486 friend ETL_CONSTEXPR type_def operator %(
const type_def& lhs,
const type_def& rhs)
488 return type_def(lhs.value % rhs.value);
494 template <
typename T>
501 operator &(
const type_def& lhs, T rhs) ETL_NOEXCEPT
503 return type_def(lhs.value & rhs);
507 template <
typename T>
514 operator &(T lhs,
const type_def& rhs) ETL_NOEXCEPT
516 return type_def(lhs & rhs.value);
520 friend ETL_CONSTEXPR type_def operator &(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
522 return type_def(lhs.value & rhs.value);
528 template <
typename T>
535 operator |(
const type_def& lhs, T rhs) ETL_NOEXCEPT
537 return type_def(lhs.value | rhs);
541 template <
typename T>
548 operator |(T lhs,
const type_def& rhs) ETL_NOEXCEPT
550 return type_def(lhs | rhs.value);
554 friend ETL_CONSTEXPR type_def operator |(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
556 return type_def(lhs.value | rhs.value);
562 template <
typename T>
569 operator ^(
const type_def& lhs, T rhs) ETL_NOEXCEPT
571 return type_def(lhs.value ^ rhs);
575 template <
typename T>
582 operator ^(T lhs,
const type_def& rhs) ETL_NOEXCEPT
584 return type_def(lhs ^ rhs.value);
588 friend ETL_CONSTEXPR type_def operator ^(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
590 return type_def(lhs.value ^ rhs.value);
596 template <
typename T>
598 operator <<(
const type_def& lhs, T rhs) ETL_NOEXCEPT
600 return type_def(lhs.value << rhs);
604 template <
typename T>
605 friend ETL_CONSTEXPR
typename etl::enable_if<(etl::is_integral<T>::value && etl::is_integral<TValue>::value), T>::type
606 operator <<(T lhs,
const type_def& rhs) ETL_NOEXCEPT
608 return lhs << rhs.value;
614 template <
typename T>
616 operator >>(
const type_def& lhs, T rhs) ETL_NOEXCEPT
618 return type_def(lhs.value >> rhs);
622 template <
typename T>
624 typename etl::enable_if<(etl::is_integral<T>::value && etl::is_integral<TValue>::value), T>::type
625 operator >>(T lhs,
const type_def& rhs) ETL_NOEXCEPT
627 return lhs >> rhs.value;
633 template <
typename T>
640 operator <(
const type_def& lhs, T rhs) ETL_NOEXCEPT
642 return lhs.value < rhs;
646 template <
typename T>
653 operator <(T lhs,
const type_def& rhs) ETL_NOEXCEPT
655 return lhs < rhs.value;
659 friend ETL_CONSTEXPR
bool operator <(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
661 return lhs.value < rhs.value;
667 template <
typename T>
674 operator <=(
const type_def& lhs, T rhs) ETL_NOEXCEPT
676 return lhs.value <= rhs;
680 template <
typename T>
687 operator <=(T lhs,
const type_def& rhs) ETL_NOEXCEPT
689 return lhs <= rhs.value;
693 friend ETL_CONSTEXPR
bool operator <=(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
695 return lhs.value <= rhs.value;
701 template <
typename T>
708 operator >(
const type_def& lhs, T rhs) ETL_NOEXCEPT
710 return lhs.value > rhs;
714 template <
typename T>
721 operator >(T lhs,
const type_def& rhs) ETL_NOEXCEPT
723 return lhs > rhs.value;
727 friend ETL_CONSTEXPR
bool operator >(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
729 return lhs.value > rhs.value;
735 template <
typename T>
742 operator >=(
const type_def& lhs, T rhs) ETL_NOEXCEPT
744 return lhs.value >= rhs;
748 template <
typename T>
755 operator >=(T lhs,
const type_def& rhs) ETL_NOEXCEPT
757 return lhs >= rhs.value;
761 friend ETL_CONSTEXPR
bool operator >=(
const type_def& lhs,
const type_def& rhs)
763 return lhs.value >= rhs.value;
769 template <
typename T>
776 operator ==(
const type_def& lhs, T rhs) ETL_NOEXCEPT
778 return lhs.value == rhs;
782 template <
typename T>
789 operator ==(T lhs,
const type_def& rhs)
791 return lhs == rhs.value;
795 friend ETL_CONSTEXPR
bool operator ==(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
797 return lhs.value == rhs.value;
803 template <
typename T>
810 operator !=(
const type_def& lhs, T rhs) ETL_NOEXCEPT
812 return lhs.value != rhs;
816 template <
typename T>
823 operator !=(T lhs,
const type_def& rhs) ETL_NOEXCEPT
825 return lhs != rhs.value;
829 friend ETL_CONSTEXPR
bool operator !=(
const type_def& lhs,
const type_def& rhs) ETL_NOEXCEPT
831 return lhs.value != rhs.value;