1
0
mirror of https://github.com/nlohmann/json synced 2024-11-26 13:50:07 +00:00

🏗️ replace is_pod by is_trivial

This commit is contained in:
Niels Lohmann 2020-02-15 10:12:27 +01:00
parent 973c52dd4a
commit 61b46a56fb
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 2 additions and 2 deletions

View File

@ -1300,7 +1300,7 @@ class binary_writer
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(std::is_pod<CharType>::value, "CharType must be POD");
static_assert(std::is_trivial<CharType>::value, "CharType must be trivial");
CharType result;
std::memcpy(&result, &x, sizeof(x));
return result;

View File

@ -12592,7 +12592,7 @@ class binary_writer
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(std::is_pod<CharType>::value, "CharType must be POD");
static_assert(std::is_trivial<CharType>::value, "CharType must be trivial");
CharType result;
std::memcpy(&result, &x, sizeof(x));
return result;