mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-06-07 01:04:55 +02:00
do intermediate step in order to omit "dereferencing type-punned pointer" error
This commit is contained in:
parent
f97723dbb7
commit
48d9a92a1b
@ -34,7 +34,8 @@ namespace Json {
|
|||||||
#define ALIGNAS(byte_alignment)
|
#define ALIGNAS(byte_alignment)
|
||||||
#endif
|
#endif
|
||||||
static const unsigned char ALIGNAS(8) kNull[sizeof(Value)] = {0};
|
static const unsigned char ALIGNAS(8) kNull[sizeof(Value)] = {0};
|
||||||
const Value& Value::null = reinterpret_cast<const Value&>(kNull);
|
const unsigned char& kNullRef = kNull[0];
|
||||||
|
const Value& Value::null = reinterpret_cast<const Value&>(kNullRef);
|
||||||
|
|
||||||
const Int Value::minInt = Int(~(UInt(-1) / 2));
|
const Int Value::minInt = Int(~(UInt(-1) / 2));
|
||||||
const Int Value::maxInt = Int(UInt(-1) / 2);
|
const Int Value::maxInt = Int(UInt(-1) / 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user