Merge branch 'develop' into doctest

This commit is contained in:
Viktor Kirilov 2019-03-18 16:59:36 +02:00 committed by GitHub
commit 365944b0bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 15683 additions and 7958 deletions

View file

@ -598,9 +598,8 @@ struct pod_serializer
static void to_json(BasicJsonType& j, const T& t) noexcept
{
auto bytes = static_cast< const unsigned char*>(static_cast<const void*>(&t));
std::uint64_t value = bytes[0];
for (auto i = 1; i < 8; ++i)
value |= std::uint64_t{bytes[i]} << 8 * i;
std::uint64_t value;
std::memcpy(&value, bytes, sizeof(value));
nlohmann::to_json(j, value);
}
};