24#ifndef TEST_DATATYPE01_HPP_
25#define TEST_DATATYPE01_HPP_
44 constexpr Addr48Bit(
const uint64_t encoded) noexcept
45 : b{
static_cast<uint8_t
>(encoded & 0xff),
46 static_cast<uint8_t
>( ( encoded >> 8 ) & 0xff),
47 static_cast<uint8_t
>( ( encoded >> 16 ) & 0xff),
48 static_cast<uint8_t
>( ( encoded >> 24 ) & 0xff),
49 static_cast<uint8_t
>( ( encoded >> 32 ) & 0xff),
50 static_cast<uint8_t
>( ( encoded >> 40 ) & 0xff)} { }
53 memcpy(b, b_,
sizeof(b));
61 bool next() noexcept {
62 for(
int i=0; i<6; ++i) {
65 for(
int j=i-1; j>=0; --j) {
73 void random(std::default_random_engine& e) {
74 std::uniform_int_distribution<uint8_t> d(0, 255);
75 for(uint8_t & i : b) {
76 i =
static_cast<uint8_t
>( d(e) );
80 constexpr std::size_t hash_code() const noexcept {
83 h = ( ( h << 5 ) - h ) + b[1];
84 h = ( ( h << 5 ) - h ) + b[2];
85 h = ( ( h << 5 ) - h ) + b[3];
86 h = ( ( h << 5 ) - h ) + b[4];
87 h = ( ( h << 5 ) - h ) + b[5];
92 std::string toString() const noexcept {
96 for(
int i=6-1; 0 <= i; --i) {
125 const uint8_t * a = lhs.b;
126 const uint8_t * b = rhs.b;
127 return a[0] == b[0] &&
136{
return !(lhs == rhs); }
157 address = std::move(o.address);
158 type = std::move(o.type);
166 address = std::move(o.address);
167 type = std::move(o.type);
174 std::size_t h = hash;
178 h = ((h << 5) - h) +
type;
210 return lhs.address == rhs.address &&
211 lhs.type == rhs.type;
214{
return !(lhs == rhs); }
237 address = std::move(o.address);
238 type = std::move(o.type);
246 address = std::move(o.address);
247 type = std::move(o.type);
254 std::size_t h = hash;
258 h = ((h << 5) - h) +
type;
290 return lhs.address == rhs.address &&
291 lhs.type == rhs.type;
294{
return !(lhs == rhs); }
301 return a.hash_code();
307 return a.hash_code();
DataType01(DataType01 &&o) noexcept
std::string toString() const noexcept
constexpr DataType01 & operator=(const DataType01 &o) noexcept
DataType01 & operator=(DataType01 &&o) noexcept
DataType01(const DataType01 &o) noexcept
std::size_t hash_code() const noexcept
DataType01(const Addr48Bit &address_, uint8_t type_)
constexpr DataType01() noexcept
DataType01(const uint64_t encoded) noexcept
DataType02_Memmove_Secmem(const Addr48Bit &address_, uint8_t type_)
std::string toString() const noexcept
DataType02_Memmove_Secmem(const uint64_t encoded) noexcept
constexpr DataType02_Memmove_Secmem() noexcept
constexpr DataType02_Memmove_Secmem & operator=(const DataType02_Memmove_Secmem &o) noexcept
std::true_type container_memmove_compliant
std::true_type enforce_secmem
DataType02_Memmove_Secmem & operator=(DataType02_Memmove_Secmem &&o) noexcept
DataType02_Memmove_Secmem(DataType02_Memmove_Secmem &&o) noexcept
std::size_t hash_code() const noexcept
DataType02_Memmove_Secmem(const DataType02_Memmove_Secmem &o) noexcept
std::string to_string(const alphabet &v) noexcept
#define constexpr_cxx20
constexpr qualifier replacement for C++20 constexpr.
#define JAU_TYPENAME_CUE_ALL(A)
std::string & byteHexString(std::string &dest, const uint8_t value, const bool lowerCase) noexcept
Produce a hexadecimal string representation of the given byte value.
__pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
std::string toString() const noexcept
constexpr std::size_t hash_code() const noexcept
std::size_t operator()(Addr48Bit const &a) const noexcept
std::size_t operator()(DataType01 const &a) const noexcept
bool operator!=(const Addr48Bit &lhs, const Addr48Bit &rhs) noexcept
bool operator==(const Addr48Bit &lhs, const Addr48Bit &rhs) noexcept