31#ifndef ETL_UNALIGNED_TYPE_INCLUDED
32#define ETL_UNALIGNED_TYPE_INCLUDED
49#if ETL_USING_CPP20 && ETL_USING_STL
80 namespace private_unaligned_type
87 template <
size_t Size_,
typename TDerivedType>
93 typedef unsigned char storage_type;
94 typedef storage_type* pointer;
95 typedef const storage_type* const_pointer;
97 typedef const storage_type* const_iterator;
127 const_pointer data()
const
143 const_iterator
begin()
const
151 const_iterator
cbegin()
const
167 const_reverse_iterator
rbegin()
const
175 const_reverse_iterator
crbegin()
const
191 const_iterator
end()
const
199 const_iterator
cend()
const
215 const_reverse_iterator
rend()
const
223 const_reverse_iterator
crend()
const
231 storage_type& operator[](
int i)
239 const storage_type& operator[](
int i)
const
268 template <
size_t Size_>
283 unsigned char storage[Size_];
291 template <
size_t Size_>
292 ETL_PACKED_CLASS(unaligned_type_storage_ext) : public unaligned_type_common<Size_, unaligned_type_storage_ext<Size_> >
296 friend class unaligned_type_common<Size_, unaligned_type_storage_ext<Size_> >;
301 unaligned_type_storage_ext(
unsigned char* storage_)
307 unaligned_type_storage_ext(
const unaligned_type_storage_ext<Size_>& other)
308 : storage(other.storage)
313 unaligned_type_storage_ext& operator =(
const unaligned_type_storage_ext<Size_>& other)
315 storage = other.storage;
320 unsigned char* storage;
326 template <
size_t Size_,
int Endian_,
bool Is_Integral>
333 template <
size_t Size_,
int Endian_>
338 typedef typename private_unaligned_type::unaligned_type_storage<Size_>::storage_type storage_type;
339 typedef typename private_unaligned_type::unaligned_type_storage<Size_>::pointer pointer;
340 typedef typename private_unaligned_type::unaligned_type_storage<Size_>::const_pointer const_pointer;
343 template <
typename T>
344 static void copy_value_to_store(
const T& value, pointer
store)
348#if ETL_HAS_CONSTEXPR_ENDIANESS
349 if ETL_IF_CONSTEXPR(Endian_ == etl::endianness::value())
351 if (Endian_ != etl::endianness::value())
359 template <
typename T>
360 static void copy_store_to_value(const_pointer
store,
T& value)
364#if ETL_HAS_CONSTEXPR_ENDIANESS
365 if ETL_IF_CONSTEXPR(
Endian == etl::endianness::value())
367 if (Endian_ != etl::endianness::value())
375 static void copy_store_to_store(const_pointer
src,
int endian_src, pointer
dst)
390 template <
size_t Size_,
int Endian_>
395 typedef typename private_unaligned_type::unaligned_type_storage<Size_>::storage_type storage_type;
396 typedef typename private_unaligned_type::unaligned_type_storage<Size_>::pointer pointer;
397 typedef typename private_unaligned_type::unaligned_type_storage<Size_>::const_pointer const_pointer;
400 template <
typename T>
401 static void copy_value_to_store(
const T& value, pointer
store)
405#if ETL_HAS_CONSTEXPR_ENDIANESS
406 if ETL_IF_CONSTEXPR(Endian_ == etl::endianness::value())
408 if (Endian_ != etl::endianness::value())
416 template <
typename T>
417 static void copy_store_to_value(const_pointer
store,
T& value)
421#if ETL_HAS_CONSTEXPR_ENDIANESS
422 if ETL_IF_CONSTEXPR(
Endian == etl::endianness::value())
424 if (Endian_ != etl::endianness::value())
427 etl::reverse(
reinterpret_cast<pointer
>(&value),
reinterpret_cast<pointer
>(&value) +
Size_);
432 static void copy_store_to_store(const_pointer
src,
int endian_src, pointer
dst)
450 template <
typename T,
int Endian_>
451 ETL_PACKED_CLASS(unaligned_type) : public private_unaligned_type::unaligned_type_storage<sizeof(T)>
452 , public private_unaligned_type::unaligned_copy<sizeof(T), Endian_,
etl::is_floating_point<T>::value ? false : true>
458 typedef T value_type;
460 typedef typename private_unaligned_type::unaligned_type_storage<
sizeof(T)>::storage_type storage_type;
461 typedef typename private_unaligned_type::unaligned_type_storage<
sizeof(T)>::pointer pointer;
462 typedef typename private_unaligned_type::unaligned_type_storage<
sizeof(T)>::const_pointer const_pointer;
463 typedef typename private_unaligned_type::unaligned_type_storage<
sizeof(T)>::iterator iterator;
464 typedef typename private_unaligned_type::unaligned_type_storage<
sizeof(T)>::const_iterator const_iterator;
465 typedef typename private_unaligned_type::unaligned_type_storage<
sizeof(T)>::reverse_iterator reverse_iterator;
466 typedef typename private_unaligned_type::unaligned_type_storage<
sizeof(T)>::const_reverse_iterator const_reverse_iterator;
468 static ETL_CONSTANT
int Endian = Endian_;
469 static ETL_CONSTANT
size_t Size =
sizeof(T);
481 unaligned_type(T value)
483 this->copy_value_to_store(value, this->storage);
489 unaligned_type(
const void* address)
491 etl::copy_n(
reinterpret_cast<const char*
>(address),
sizeof(T), this->storage);
497 unaligned_type(
const void* address,
size_t buffer_size)
501 etl::copy_n(
reinterpret_cast<const char*
>(address),
sizeof(T), this->storage);
507 unaligned_type(
const unaligned_type<T, Endian>& other)
509 this->copy_store_to_store(other.data(), Endian, this->storage);
515 template <
int Endian_Other>
516 unaligned_type(
const unaligned_type<T, Endian_Other>& other)
518 this->copy_store_to_store(other.data(), Endian_Other, this->storage);
524 unaligned_type& operator =(T value)
526 this->copy_value_to_store(value, this->storage);
534 unaligned_type& operator =(
const unaligned_type<T, Endian_>& other)
536 this->copy_store_to_store(other.data(), Endian_, this->storage);
544 template <
int Endian_Other>
545 unaligned_type& operator =(
const unaligned_type<T, Endian_Other>& other)
547 this->copy_store_to_store(other.data(), Endian_Other, this->storage);
559 this->copy_store_to_value(this->storage, value);
571 this->copy_store_to_value(this->storage, value);
577 template <
typename T,
int Endian_>
578 ETL_CONSTANT
int unaligned_type<T, Endian_>::Endian;
580 template <
typename T,
int Endian_>
581 ETL_CONSTANT
size_t unaligned_type<T, Endian_>::Size;
590 template <
typename T,
int Endian_>
591 ETL_PACKED_CLASS(unaligned_type_ext) : public private_unaligned_type::unaligned_type_storage_ext<sizeof(T)>
592 , public private_unaligned_type::unaligned_copy<sizeof(T), Endian_,
etl::is_floating_point<T>::value ? false : true>
598 template <
typename U,
int Endian_Other>
599 friend class unaligned_type_ext;
601 typedef T value_type;
603 typedef typename private_unaligned_type::unaligned_type_storage_ext<
sizeof(T)>::storage_type storage_type;
604 typedef typename private_unaligned_type::unaligned_type_storage_ext<
sizeof(T)>::pointer pointer;
605 typedef typename private_unaligned_type::unaligned_type_storage_ext<
sizeof(T)>::const_pointer const_pointer;
606 typedef typename private_unaligned_type::unaligned_type_storage_ext<
sizeof(T)>::iterator iterator;
607 typedef typename private_unaligned_type::unaligned_type_storage_ext<
sizeof(T)>::const_iterator const_iterator;
608 typedef typename private_unaligned_type::unaligned_type_storage_ext<
sizeof(T)>::reverse_iterator reverse_iterator;
609 typedef typename private_unaligned_type::unaligned_type_storage_ext<
sizeof(T)>::const_reverse_iterator const_reverse_iterator;
611 static ETL_CONSTANT
int Endian = Endian_;
612 static ETL_CONSTANT
size_t Size =
sizeof(T);
617 unaligned_type_ext(pointer storage_)
618 : private_unaligned_type::unaligned_type_storage_ext<Size>(storage_)
625 unaligned_type_ext(T value, pointer storage_)
626 : private_unaligned_type::unaligned_type_storage_ext<Size>(storage_)
628 this->copy_value_to_store(value, this->storage);
634 template <
int Endian_Other>
635 unaligned_type_ext(
const unaligned_type_ext<T, Endian_Other>& other, pointer storage_)
636 : private_unaligned_type::unaligned_type_storage_ext<Size>(storage_)
638 this->copy_store_to_store(other.data(), Endian_Other, this->storage);
645 unaligned_type_ext(unaligned_type_ext<T, Endian>&& other)
646 : private_unaligned_type::unaligned_type_storage_ext<Size>(other.storage)
648 other.storage = ETL_NULLPTR;
654 template <
int Endian_Other>
655 unaligned_type_ext(unaligned_type_ext<T, Endian_Other>&& other)
656 : private_unaligned_type::unaligned_type_storage_ext<Size>(other.storage)
659 if (Endian != Endian_Other)
661 etl::reverse(this->
begin(), this->
end());
664 other.storage = ETL_NULLPTR;
671 unaligned_type_ext& operator =(T value)
673 this->copy_value_to_store(value, this->storage);
681 unaligned_type_ext& operator =(
const unaligned_type_ext<T, Endian>& other)
683 this->copy_store_to_store(other.data(), Endian, this->storage);
691 template <
int Endian_Other>
692 unaligned_type_ext& operator =(
const unaligned_type_ext<T, Endian_Other>& other)
694 this->copy_store_to_store(other.data(), Endian_Other, this->storage);
703 unaligned_type_ext& operator =(unaligned_type_ext<T, Endian>&& other)
705 this->storage = other.storage;
706 other.storage = ETL_NULLPTR;
714 template <
int Endian_Other>
715 unaligned_type_ext& operator =(unaligned_type_ext<T, Endian_Other>&& other)
717 this->storage = other.storage;
720 if (Endian != Endian_Other)
722 etl::reverse(this->
begin(), this->
end());
725 other.storage = ETL_NULLPTR;
738 this->copy_store_to_value(this->storage, value);
750 this->copy_store_to_value(this->storage, value);
758 void set_storage(pointer storage_)
760 this->storage = storage_;
765 unaligned_type_ext() ETL_DELETE;
769 template <typename T,
int Endian_>
770 ETL_CONSTANT
int unaligned_type_ext<T, Endian_>::Endian;
772 template <typename T,
int Endian_>
773 ETL_CONSTANT
size_t unaligned_type_ext<T, Endian_>::Size;
775#if ETL_HAS_CONSTEXPR_ENDIANNESS
777 typedef unaligned_type<char, etl::endianness::value()> host_char_t;
778 typedef unaligned_type<
signed char, etl::endianness::value()> host_schar_t;
779 typedef unaligned_type<
unsigned char, etl::endianness::value()> host_uchar_t;
780 typedef unaligned_type<short, etl::endianness::value()> host_short_t;
781 typedef unaligned_type<
unsigned short, etl::endianness::value()> host_ushort_t;
782 typedef unaligned_type<int, etl::endianness::value()> host_int_t;
783 typedef unaligned_type<
unsigned int, etl::endianness::value()> host_uint_t;
784 typedef unaligned_type<long, etl::endianness::value()> host_long_t;
785 typedef unaligned_type<
unsigned long, etl::endianness::value()> host_ulong_t;
786 typedef unaligned_type<
long long, etl::endianness::value()> host_long_long_t;
787 typedef unaligned_type<
unsigned long long, etl::endianness::value()> host_ulong_long_t;
788#if ETL_USING_8BIT_TYPES
789 typedef unaligned_type<int8_t, etl::endianness::value()> host_int8_t;
790 typedef unaligned_type<uint8_t, etl::endianness::value()> host_uint8_t;
792 typedef unaligned_type<int16_t, etl::endianness::value()> host_int16_t;
793 typedef unaligned_type<uint16_t, etl::endianness::value()> host_uint16_t;
794 typedef unaligned_type<int32_t, etl::endianness::value()> host_int32_t;
795 typedef unaligned_type<uint32_t, etl::endianness::value()> host_uint32_t;
796#if ETL_USING_64BIT_TYPES
797 typedef unaligned_type<int64_t, etl::endianness::value()> host_int64_t;
798 typedef unaligned_type<uint64_t, etl::endianness::value()> host_uint64_t;
800 typedef unaligned_type<float, etl::endianness::value()> host_float_t;
801 typedef unaligned_type<double, etl::endianness::value()> host_double_t;
802 typedef unaligned_type<
long double, etl::endianness::value()> host_long_double_t;
806 typedef unaligned_type<char, etl::endian::little> le_char_t;
807 typedef unaligned_type<signed char, etl::endian::little> le_schar_t;
808 typedef unaligned_type<unsigned char, etl::endian::little> le_uchar_t;
809 typedef unaligned_type<short, etl::endian::little> le_short_t;
810 typedef unaligned_type<unsigned short, etl::endian::little> le_ushort_t;
811 typedef unaligned_type<int, etl::endian::little> le_int_t;
812 typedef unaligned_type<unsigned int, etl::endian::little> le_uint_t;
813 typedef unaligned_type<long, etl::endian::little> le_long_t;
814 typedef unaligned_type<unsigned long, etl::endian::little> le_ulong_t;
815 typedef unaligned_type<long long, etl::endian::little> le_long_long_t;
816 typedef unaligned_type<unsigned long long, etl::endian::little> le_ulong_long_t;
817#if ETL_USING_8BIT_TYPES
818 typedef unaligned_type<int8_t, etl::endian::little> le_int8_t;
819 typedef unaligned_type<uint8_t, etl::endian::little> le_uint8_t;
821 typedef unaligned_type<int16_t, etl::endian::little> le_int16_t;
822 typedef unaligned_type<uint16_t, etl::endian::little> le_uint16_t;
823 typedef unaligned_type<int32_t, etl::endian::little> le_int32_t;
824 typedef unaligned_type<uint32_t, etl::endian::little> le_uint32_t;
825#if ETL_USING_64BIT_TYPES
826 typedef unaligned_type<int64_t, etl::endian::little> le_int64_t;
827 typedef unaligned_type<uint64_t, etl::endian::little> le_uint64_t;
829 typedef unaligned_type<float, etl::endian::little> le_float_t;
830 typedef unaligned_type<double, etl::endian::little> le_double_t;
831 typedef unaligned_type<long double, etl::endian::little> le_long_double_t;
834 typedef unaligned_type<char, etl::endian::big> be_char_t;
835 typedef unaligned_type<signed char, etl::endian::big> be_schar_t;
836 typedef unaligned_type<unsigned char, etl::endian::big> be_uchar_t;
837 typedef unaligned_type<short, etl::endian::big> be_short_t;
838 typedef unaligned_type<unsigned short, etl::endian::big> be_ushort_t;
839 typedef unaligned_type<int, etl::endian::big> be_int_t;
840 typedef unaligned_type<unsigned int, etl::endian::big> be_uint_t;
841 typedef unaligned_type<long, etl::endian::big> be_long_t;
842 typedef unaligned_type<unsigned long, etl::endian::big> be_ulong_t;
843 typedef unaligned_type<long long, etl::endian::big> be_long_long_t;
844 typedef unaligned_type<unsigned long long, etl::endian::big> be_ulong_long_t;
845#if ETL_USING_8BIT_TYPES
846 typedef unaligned_type<int8_t, etl::endian::big> be_int8_t;
847 typedef unaligned_type<uint8_t, etl::endian::big> be_uint8_t;
849 typedef unaligned_type<int16_t, etl::endian::big> be_int16_t;
850 typedef unaligned_type<uint16_t, etl::endian::big> be_uint16_t;
851 typedef unaligned_type<int32_t, etl::endian::big> be_int32_t;
852 typedef unaligned_type<uint32_t, etl::endian::big> be_uint32_t;
853#if ETL_USING_64BIT_TYPES
854 typedef unaligned_type<int64_t, etl::endian::big> be_int64_t;
855 typedef unaligned_type<uint64_t, etl::endian::big> be_uint64_t;
857 typedef unaligned_type<float, etl::endian::big> be_float_t;
858 typedef unaligned_type<double, etl::endian::big> be_double_t;
859 typedef unaligned_type<long double, etl::endian::big> be_long_double_t;
862 typedef be_char_t net_char_t;
863 typedef be_schar_t net_schar_t;
864 typedef be_uchar_t net_uchar_t;
865 typedef be_short_t net_short_t;
866 typedef be_ushort_t net_ushort_t;
867 typedef be_int_t net_int_t;
868 typedef be_uint_t net_uint_t;
869 typedef be_long_t net_long_t;
870 typedef be_ulong_t net_ulong_t;
871 typedef be_long_long_t net_long_long_t;
872 typedef be_ulong_long_t net_ulong_long_t;
873#if ETL_USING_8BIT_TYPES
874 typedef be_int8_t net_int8_t;
875 typedef be_uint8_t net_uint8_t;
877 typedef be_int16_t net_int16_t;
878 typedef be_uint16_t net_uint16_t;
879 typedef be_int32_t net_int32_t;
880 typedef be_uint32_t net_uint32_t;
881#if ETL_USING_64BIT_TYPES
882 typedef be_int64_t net_int64_t;
883 typedef be_uint64_t net_uint64_t;
885 typedef be_float_t net_float_t;
886 typedef be_double_t net_double_t;
887 typedef be_long_double_t net_long_double_t;
890 template <
typename T,
int Endian>
895 template <
typename T,
int Endian>
899#if ETL_HAS_CONSTEXPR_ENDIANNESS
901 typedef unaligned_type_ext<char, etl::endianness::value()> host_char_ext_t;
902 typedef unaligned_type_ext<
signed char, etl::endianness::value()> host_schar_ext_t;
903 typedef unaligned_type_ext<
unsigned char, etl::endianness::value()> host_uchar_ext_t;
904 typedef unaligned_type_ext<short, etl::endianness::value()> host_short_ext_t;
905 typedef unaligned_type_ext<
unsigned short, etl::endianness::value()> host_ushort_ext_t;
906 typedef unaligned_type_ext<int, etl::endianness::value()> host_int_ext_t;
907 typedef unaligned_type_ext<
unsigned int, etl::endianness::value()> host_uint_ext_t;
908 typedef unaligned_type_ext<long, etl::endianness::value()> host_long_ext_t;
909 typedef unaligned_type_ext<
unsigned long, etl::endianness::value()> host_ulong_ext_t;
910 typedef unaligned_type_ext<
long long, etl::endianness::value()> host_long_long_ext_t;
911 typedef unaligned_type_ext<
unsigned long long, etl::endianness::value()> host_ulong_long_ext_t;
912#if ETL_USING_8BIT_TYPES
913 typedef unaligned_type_ext<int8_t, etl::endianness::value()> host_int8_ext_t;
914 typedef unaligned_type_ext<uint8_t, etl::endianness::value()> host_uint8_ext_t;
916 typedef unaligned_type_ext<int16_t, etl::endianness::value()> host_int16_ext_t;
917 typedef unaligned_type_ext<uint16_t, etl::endianness::value()> host_uint16_ext_t;
918 typedef unaligned_type_ext<int32_t, etl::endianness::value()> host_int32_ext_t;
919 typedef unaligned_type_ext<uint32_t, etl::endianness::value()> host_uint32_ext_t;
920#if ETL_USING_64BIT_TYPES
921 typedef unaligned_type_ext<int64_t, etl::endianness::value()> host_int64_ext_t;
922 typedef unaligned_type_ext<uint64_t, etl::endianness::value()> host_uint64_ext_t;
924 typedef unaligned_type_ext<float, etl::endianness::value()> host_float_ext_t;
925 typedef unaligned_type_ext<double, etl::endianness::value()> host_double_ext_t;
926 typedef unaligned_type_ext<
long double, etl::endianness::value()> host_long_double_ext_t;
930 typedef unaligned_type_ext<char, etl::endian::little> le_char_ext_t;
931 typedef unaligned_type_ext<signed char, etl::endian::little> le_schar_ext_t;
932 typedef unaligned_type_ext<unsigned char, etl::endian::little> le_uchar_ext_t;
933 typedef unaligned_type_ext<short, etl::endian::little> le_short_ext_t;
934 typedef unaligned_type_ext<unsigned short, etl::endian::little> le_ushort_ext_t;
935 typedef unaligned_type_ext<int, etl::endian::little> le_int_ext_t;
936 typedef unaligned_type_ext<unsigned int, etl::endian::little> le_uint_ext_t;
937 typedef unaligned_type_ext<long, etl::endian::little> le_long_ext_t;
938 typedef unaligned_type_ext<unsigned long, etl::endian::little> le_ulong_ext_t;
939 typedef unaligned_type_ext<long long, etl::endian::little> le_long_long_ext_t;
940 typedef unaligned_type_ext<unsigned long long, etl::endian::little> le_ulong_long_ext_t;
941 #if ETL_USING_8BIT_TYPES
942 typedef unaligned_type_ext<int8_t, etl::endian::little> le_int8_ext_t;
943 typedef unaligned_type_ext<uint8_t, etl::endian::little> le_uint8_ext_t;
945 typedef unaligned_type_ext<int16_t, etl::endian::little> le_int16_ext_t;
946 typedef unaligned_type_ext<uint16_t, etl::endian::little> le_uint16_ext_t;
947 typedef unaligned_type_ext<int32_t, etl::endian::little> le_int32_ext_t;
948 typedef unaligned_type_ext<uint32_t, etl::endian::little> le_uint32_ext_t;
949 #if ETL_USING_64BIT_TYPES
950 typedef unaligned_type_ext<int64_t, etl::endian::little> le_int64_ext_t;
951 typedef unaligned_type_ext<uint64_t, etl::endian::little> le_uint64_ext_t;
953 typedef unaligned_type_ext<float, etl::endian::little> le_float_ext_t;
954 typedef unaligned_type_ext<double, etl::endian::little> le_double_ext_t;
955 typedef unaligned_type_ext<long double, etl::endian::little> le_long_double_ext_t;
958 typedef unaligned_type_ext<char, etl::endian::big> be_char_ext_t;
959 typedef unaligned_type_ext<signed char, etl::endian::big> be_schar_ext_t;
960 typedef unaligned_type_ext<unsigned char, etl::endian::big> be_uchar_ext_t;
961 typedef unaligned_type_ext<short, etl::endian::big> be_short_ext_t;
962 typedef unaligned_type_ext<unsigned short, etl::endian::big> be_ushort_ext_t;
963 typedef unaligned_type_ext<int, etl::endian::big> be_int_ext_t;
964 typedef unaligned_type_ext<unsigned int, etl::endian::big> be_uint_ext_t;
965 typedef unaligned_type_ext<long, etl::endian::big> be_long_ext_t;
966 typedef unaligned_type_ext<unsigned long, etl::endian::big> be_ulong_ext_t;
967 typedef unaligned_type_ext<long long, etl::endian::big> be_long_long_ext_t;
968 typedef unaligned_type_ext<unsigned long long, etl::endian::big> be_ulong_long_ext_t;
969 #if ETL_USING_8BIT_TYPES
970 typedef unaligned_type_ext<int8_t, etl::endian::big> be_int8_ext_t;
971 typedef unaligned_type_ext<uint8_t, etl::endian::big> be_uint8_ext_t;
973 typedef unaligned_type_ext<int16_t, etl::endian::big> be_int16_ext_t;
974 typedef unaligned_type_ext<uint16_t, etl::endian::big> be_uint16_ext_t;
975 typedef unaligned_type_ext<int32_t, etl::endian::big> be_int32_ext_t;
976 typedef unaligned_type_ext<uint32_t, etl::endian::big> be_uint32_ext_t;
977 #if ETL_USING_64BIT_TYPES
978 typedef unaligned_type_ext<int64_t, etl::endian::big> be_int64_ext_t;
979 typedef unaligned_type_ext<uint64_t, etl::endian::big> be_uint64_ext_t;
981 typedef unaligned_type_ext<float, etl::endian::big> be_float_ext_t;
982 typedef unaligned_type_ext<double, etl::endian::big> be_double_ext_t;
983 typedef unaligned_type_ext<long double, etl::endian::big> be_long_double_ext_t;
986 typedef be_char_ext_t net_char_ext_t;
987 typedef be_schar_ext_t net_schar_ext_t;
988 typedef be_uchar_ext_t net_uchar_ext_t;
989 typedef be_short_ext_t net_short_ext_t;
990 typedef be_ushort_ext_t net_ushort_ext_t;
991 typedef be_int_ext_t net_int_ext_t;
992 typedef be_uint_ext_t net_uint_ext_t;
993 typedef be_long_ext_t net_long_ext_t;
994 typedef be_ulong_ext_t net_ulong_ext_t;
995 typedef be_long_long_ext_t net_long_long_ext_t;
996 typedef be_ulong_long_ext_t net_ulong_long_ext_t;
997#if ETL_USING_8BIT_TYPES
998 typedef be_int8_ext_t net_int8_ext_t;
999 typedef be_uint8_ext_t net_uint8_ext_t;
1001 typedef be_int16_ext_t net_int16_ext_t;
1002 typedef be_uint16_ext_t net_uint16_ext_t;
1003 typedef be_int32_ext_t net_int32_ext_t;
1004 typedef be_uint32_ext_t net_uint32_ext_t;
1005#if ETL_USING_64BIT_TYPES
1006 typedef be_int64_ext_t net_int64_ext_t;
1007 typedef be_uint64_ext_t net_uint64_ext_t;
1009 typedef be_float_ext_t net_float_ext_t;
1010 typedef be_double_ext_t net_double_ext_t;
1011 typedef be_long_double_ext_t net_long_double_ext_t;
1014 template <
typename T,
int Endian>
1019 template <
typename T,
int Endian>
Unaligned copy.
Definition unaligned_type.h:327
Definition iterator.h:228
Buffer size exception.
Definition unaligned_type.h:71
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value &&(etl::integral_limits< T >::bits==16U), T >::type reverse_bytes(T value)
Definition binary.h:739
#define ETL_ASSERT(b, e)
Definition error_handler.h:356
Definition exception.h:47
is_floating_point
Definition type_traits_generator.h:1026
is_integral
Definition type_traits_generator.h:996
bitset_ext
Definition absolute.h:38
ETL_CONSTEXPR TContainer::reverse_iterator rend(TContainer &container)
Definition iterator.h:1114
ETL_CONSTEXPR TContainer::const_reverse_iterator crbegin(const TContainer &container)
Definition iterator.h:1104
ETL_CONSTEXPR TContainer::reverse_iterator rbegin(TContainer &container)
Definition iterator.h:1084
ETL_CONSTEXPR TContainer::const_iterator cbegin(const TContainer &container)
Definition iterator.h:982
ETL_CONSTEXPR TContainer::size_type size(const TContainer &container)
Definition iterator.h:1187
ETL_CONSTEXPR TContainer::iterator begin(TContainer &container)
Definition iterator.h:962
ETL_CONSTEXPR TContainer::const_reverse_iterator crend(const TContainer &container)
Definition iterator.h:1134
ETL_CONSTEXPR TContainer::const_iterator cend(const TContainer &container)
Definition iterator.h:1012
ETL_CONSTEXPR TContainer::iterator end(TContainer &container)
Definition iterator.h:992
iterator
Definition iterator.h:399
pair holds two objects of arbitrary type
Definition utility.h:164
Definition unaligned_type.h:58