-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
Description
I was hoping it would be possible to set NumberIntegerType
and NumberUnsignedType
(putting aside #2573 for now) to an arbitrary precision integer type ("big integers"), such as on wrapper types around the gnu multiple precision arithmetic library.
Unfortunately, this is not permitted as json_value
is a C-style tagged union that doesn't permit any of its types to have non-trivial destructors/move constructors etc; and mpz
is stored on the heap.
I understand this is quite a big ask, but I thought it was worth having an issue explicitly mentioning big integers since I wasn't able to find an existing one via search.
Reproduction steps
Attempt to use some numeric heap type for the numeric type parameters. I'm afraid I don't have a trivial example to hand without external dependencies.
Expected vs. actual results
In an ideal world, I would expect everthing to just work. Instead, I get compiler errors about deleted operators on json_value
due to it being a union of non trivial types.
Minimal code example
No response
Error messages
No response
Compiler and operating system
N/A
Library version
Validation
- The bug also occurs if the latest version from the
develop
branch is used. - I can successfully compile and run the unit tests.