diff options
-rw-r--r-- | include/jau/int_types.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/jau/int_types.hpp b/include/jau/int_types.hpp index edebcb6..a58af79 100644 --- a/include/jau/int_types.hpp +++ b/include/jau/int_types.hpp @@ -65,6 +65,7 @@ namespace jau { uint8_t data[16]; constexpr uint128_t() noexcept : data{0} {} + constexpr uint128_t(const uint8_t v[16]) noexcept : data{0} { std::memcpy(data, v, 16); } constexpr uint128_t(const uint128_t &o) noexcept = default; uint128_t(uint128_t &&o) noexcept = default; constexpr uint128_t& operator=(const uint128_t &o) noexcept = default; @@ -86,6 +87,7 @@ namespace jau { uint8_t data[24]; constexpr uint192_t() noexcept : data{0} {} + constexpr uint192_t(const uint8_t v[24]) noexcept : data{0} { std::memcpy(data, v, 24); } constexpr uint192_t(const uint192_t &o) noexcept = default; uint192_t(uint192_t &&o) noexcept = default; constexpr uint192_t& operator=(const uint192_t &o) noexcept = default; @@ -107,6 +109,7 @@ namespace jau { uint8_t data[32]; constexpr uint256_t() noexcept : data{0} {} + constexpr uint256_t(const uint8_t v[32]) noexcept : data{0} { std::memcpy(data, v, 32); } constexpr uint256_t(const uint256_t &o) noexcept = default; uint256_t(uint256_t &&o) noexcept = default; constexpr uint256_t& operator=(const uint256_t &o) noexcept = default; |