Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'd like to retrieve uint64_t that exceed the range of int64_t #220

Open
virtuald opened this issue May 24, 2023 · 1 comment
Open

I'd like to retrieve uint64_t that exceed the range of int64_t #220

virtuald opened this issue May 24, 2023 · 1 comment

Comments

@virtuald
Copy link

The TOML standard specifies:

Arbitrary 64-bit signed integers (from −2^63 to 2^63−1) should be accepted and handled losslessly. If an integer cannot be represented losslessly, an error must be thrown.

python's tomli can handle arbitrary sized integers, and I'd really like to be able to read 0x8000000000000000 from a TOML file using toml11.

It seems to me that the best way to make this doable (and optional) is to provide some template overload (similar to how comments are dealt with) to modify the parsing behavior to accept a custom function or something to retrieve/store the integer value. Then a user can define how they want to store the integer.

@Bqleine
Copy link

Bqleine commented May 15, 2024

+1, I'd also love to be able to read my uint64_t from toml without having to bother about negative values and losing half the range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants