|
mitteLib
|
#include <cstdint>#include <tuple>#include <type_traits>

Go to the source code of this file.
Namespaces | |
| namespace | mlab |
| namespace | mlab::impl |
Typedefs | |
| template<unsigned Bits> | |
| using | mlab::uint_least_t = decltype(impl::get_uint_least<Bits>()) |
| template<unsigned Bits> | |
| using | mlab::uint_exact_t = decltype(impl::get_uint_exact<Bits>()) |
| template<unsigned Bits> | |
| using | mlab::int_least_t = std::make_signed_t<uint_least_t<Bits>> |
Enumerations | |
| enum struct | mlab::byte_order { mlab::msb_first , mlab::lsb_first } |
Functions | |
| template<unsigned Bits> | |
| auto | mlab::impl::get_uint_exact () |
| template<unsigned Bits> | |
| auto | mlab::impl::get_uint_least () |
| template<byte_order Order, unsigned Bits, class Num> | |
| std::array< std::uint8_t, Bits/8 > | mlab::encode (Num n) |
| template<byte_order Order, unsigned Bits, class Num> | |
| Num | mlab::decode (std::array< std::uint8_t, Bits/8 > const &b) |
| template<class Num, std::size_t NBytes> | |
| constexpr Num | mlab::lsb_unsigned_decode (std::array< std::uint8_t, NBytes > b) |
| template<class Num, std::size_t NBytes, std::size_t I = NBytes - 1> | |
| constexpr Num | mlab::msb_unsigned_decode (std::array< std::uint8_t, NBytes > b) |
| template<class Num, std::size_t NBytes> | |
| constexpr std::array< std::uint8_t, NBytes > | mlab::lsb_unsigned_encode (Num n) |
| template<class Num, std::size_t NBytes> | |
| constexpr std::array< std::uint8_t, NBytes > | mlab::msb_unsigned_encode (Num n) |
| template<class Num, std::size_t NBytes> | |
| constexpr Num | mlab::msb_unsigned_decode (std::array< std::uint8_t, NBytes > b) |