byte
A type that implements the concept of byte
C++03
Implemented as a class.
Cannot be cast using static_cast.
C++11 or above
Implemented as enum class.
All functions are constexpr.
Constructors
byte()Description
Constructs a default initialised byte.
C++03
template <typename T>
explicit byte(T v)Constructs a byte initialised to v.
Non-member functions
template <typename TInteger>
constexpr TInteger to_integer(etl::byte b) noexceptDescription
Converts to an integral type.
constexpr and noexcept for C++11 and above.
template <typename TInteger>
constexpr etl::byte operator <<(etl::byte b, TInteger shift) noexceptDescription
Shifts the value of the byte to the left and returns the new byte.
constexpr and noexcept for C++11 and above.
template <typename TInteger>
constexpr etl::byte operator >>(etl::byte b, TInteger shift) noexceptDescription
Shifts the value of the byte to the right and returns the new byte.
constexpr and noexcept for C++11 and above.
template <typename TInteger>
constexpr etl::byte& operator <<=(etl::byte& b, TInteger shift) noexceptDescription
Shifts the value of the byte to the left and returns a reference to the byte.
constexpr and noexcept for C++11 and above.
template <typename TInteger>
constexpr etl::byte& operator >>=(etl::byte& b, TInteger shift) noexceptDescription
Shifts the value of the byte to the right and returns a reference to the byte.
constexpr and noexcept for C++11 and above.
constexpr etl::byte operator |(etl::byte lhs, etl::byte rhs) noexceptORs the two bytes returns the new byte.
constexpr and noexcept for C++11 and above.
constexpr etl::byte operator &(etl::byte lhs, etl::byte rhs) noexceptDescription
ANDs the two bytes returns the new byte.
constexpr and noexcept for C++11 and above.
constexpr etl::byte operator ^(etl::byte lhs, etl::byte rhs) noexceptDescription
Exclusive ORs the two bytes returns the new byte.
constexpr and noexcept for C++11 and above.
constexpr etl::byte& operator |=(etl::byte& lhs, etl::byte rhs) noexceptDescription
ORs the two bytes returns and a reference to the first parameter.
constexpr for C++14 and above.
noexcept for C++11 and above.
constexpr etl::byte& operator &=(etl::byte& lhs, etl::byte rhs) noexceptDescription
ANDs the two bytes returns and a reference to the first parameter.
constexpr for C++14 and above.
noexcept for C++11 and above.
constexpr etl::byte& operator ^=(etl::byte& lhs, etl::byte rhs) noexceptDescription
Exclusive ORs the two bytes and returns a reference to the first parameter.
constexpr for C++14 and above.
noexcept for C++11 and above.
constexpr etl::byte operator ~(etl::byte b) noexceptDescription
Negates the value of the byte and returns the new value.
constexpr and noexcept for C++11 and above.