Closed chrimbo closed 4 months ago
Hi, sorry for taking so long to get back to you. Looking into this now.
Re your second example, the negative number: that behaviour is correct - hexadecimal numbers are always unsigned in TOML.
Oh, ok, it's correct: Integers in TOML are 64-bit signed, and that value is outside the representable by an int64_t
(i.e. it's higher than INT64_MAX
). This isn't a bug, I'm afraid. I'll refine the error message to be a bit clearer.
So there's no way to express 0xca343183acdf73b4 other than writing it as -3866893791544805260
In TOML, yep.
Thanks for clarification
Environment
toml++ version and/or commit hash:
toml++ v3.4.0
Compiler:
MinGW81_64, GCC 8.1.0
C++ standard mode:
c++17
Target arch:
x86_64
Describe the bug
I'm trying to parse
Value=0xca343183acdf73b4
, resulting in an "Error while parsing hexadecimal integer: '0xca343183acdf73b4' is not representable in 64 bits "Also tried
Value=-0x35CBCE7C53208C4C
, resulting in "Error while parsing hexadecimal interger: expected '0', saw '-'"and
Value=0x-35CBCE7C53208C4C
, also resulting in "Error while parsing hexadecimal integer: expected digit, saw '-'"