🏗 replace is_pod by is_trivial

parent 973c52dd
...@@ -1300,7 +1300,7 @@ class binary_writer ...@@ -1300,7 +1300,7 @@ class binary_writer
static CharType to_char_type(std::uint8_t x) noexcept static CharType to_char_type(std::uint8_t x) noexcept
{ {
static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t"); static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t");
static_assert(std::is_pod<CharType>::value, "CharType must be POD"); static_assert(std::is_trivial<CharType>::value, "CharType must be trivial");
CharType result; CharType result;
std::memcpy(&result, &x, sizeof(x)); std::memcpy(&result, &x, sizeof(x));
return result; return result;
......
...@@ -12592,7 +12592,7 @@ class binary_writer ...@@ -12592,7 +12592,7 @@ class binary_writer
static CharType to_char_type(std::uint8_t x) noexcept static CharType to_char_type(std::uint8_t x) noexcept
{ {
static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t"); static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t");
static_assert(std::is_pod<CharType>::value, "CharType must be POD"); static_assert(std::is_trivial<CharType>::value, "CharType must be trivial");
CharType result; CharType result;
std::memcpy(&result, &x, sizeof(x)); std::memcpy(&result, &x, sizeof(x));
return result; return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment