mirror of
https://github.com/nlohmann/json.git
synced 2026-09-16 21:27:58 +00:00
deploy: c72f37a40d
This commit is contained in:
@@ -14,6 +14,10 @@ This description includes both integer and floating-point numbers. However, C++
|
||||
|
||||
To store floating-point numbers in C++, a type is defined by the template parameter `NumberFloatType` which chooses the type to use.
|
||||
|
||||
## Template parameters
|
||||
|
||||
`NumberFloatType` : the type to store floating-point numbers. Parsing and serialization are implemented in terms of `std::strtof`/`std::strtod`/`std::strtold` and `std::snprintf`, so the type must be `float`, `double`, or `long double`. The [binary formats](https://json.nlohmann.me/features/binary_formats/index.md) additionally require `float` or `double`, because they have no encoding for `long double`. See [Template Parameter Requirements](https://json.nlohmann.me/features/types/template_parameters/#numberfloattype).
|
||||
|
||||
## Notes
|
||||
|
||||
#### Default type
|
||||
|
||||
Reference in New Issue
Block a user