mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-16 00:46:03 +08:00
81 lines
3.9 KiB
Plaintext
81 lines
3.9 KiB
Plaintext
byte
|
|
20.24.0
|
|
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
|
|
C++03
|
|
byte()
|
|
Constructs a default initialised byte.
|
|
____________________________________________________________________________________________________
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
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) noexcept
|
|
Negates the value of the byte and returns the new value.
|
|
constexpr and noexcept for C++11 and above.
|
|
|