Class storing a sequence of bytes converting them to and from unsigned integer.
More...
|
constexpr | byteset () noexcept=default |
| Default constructor.
|
|
template<typename... B, typename = std::enable_if_t< (sizeof...(B) == N) && (sizeof...(B) != 0) && std::conjunction_v<std::true_type, std::is_convertible<B, value_type>...>>> |
constexpr | byteset (B... b) noexcept |
| Construction from a pack of integer values.
|
|
template<typename UInt , typename = std::enable_if_t< (sizeof(UInt) >= N) && std::is_integral_v<UInt> && std::is_unsigned_v<UInt>>> |
constexpr | byteset (UInt init) noexcept |
| Construiction from unsigned integer that is then split into bytes.
|
|
auto | data () noexcept -> pointer |
| Returns a pointer to the byte sequence start. More...
|
|
constexpr auto | data () const noexcept -> const_pointer |
| Returns a const pointer to the byte sequence start. More...
|
|
constexpr auto | size () const noexcept -> size_type |
| Returns the count of bytes in the stored sequence.
|
|
constexpr auto | block () const noexcept -> memory::const_block |
| Creates a const view over the stored sequence of bytes.
|
|
constexpr auto | operator[] (size_type i) noexcept -> reference |
| Subscript operator.
|
|
constexpr auto | operator[] (size_type i) const noexcept -> const_reference |
| Subscript operator.
|
|
constexpr auto | front () noexcept -> reference |
| Returns the first byte in the sequence. More...
|
|
constexpr auto | front () const noexcept -> const_reference |
| Returns the first byte in the sequence. More...
|
|
constexpr auto | back () noexcept -> reference |
| Returns the last byte in the sequence. More...
|
|
constexpr auto | back () const noexcept -> const_reference |
| Returns the last byte in the sequence. More...
|
|
auto | begin () noexcept -> iterator |
| Returns an iterator to the start of the byte sequence.
|
|
auto | end () noexcept -> iterator |
| Returns an iterator past the end of the byte sequence.
|
|
constexpr auto | begin () const noexcept -> const_iterator |
| Returns a const iterator to the start of the byte sequence.
|
|
constexpr auto | end () const noexcept -> const_iterator |
| Returns a const iterator past the end of the byte sequence.
|
|
template<typename UInt , typename = std::enable_if_t< (sizeof(UInt) >= N) && ( std::is_same_v<UInt, __uint128_t> || std::is_same_v<UInt, __int128_t> || std::is_integral_v<UInt>)>> |
constexpr auto | as (UInt i=0) const noexcept |
| Converts the byte sequence into an unsigned integer value.
|
|
template<std::size_t N>
class eagine::byteset< N >
Class storing a sequence of bytes converting them to and from unsigned integer.
- Template Parameters
-
N | the size - number of elements - in the byte sequence. |
- See also
- biteset