Defined in header <fkYAML/node.hpp>
fkyaml::basic_node::float_number_type¶
The type used to store floating point values.
The YAML specification describes a floating point value as a type which differentiates the following literals:
- real numbers (with scientific notation) → a floating point value
- (+/-).inf, (+/-).Inf, (+/-).INF → the positive/negative infinity
- .nan, .NaN, .NAN → Not a Number
The actual type is defined by the template parameter FloatNumberType
.
If not explicitly specified, the default type double
is defined.
With the decided type, floating point values are stored directly inside a basic_node
.
Examples¶
Example
#include <iomanip>
#include <iostream>
#include <type_traits>
#include <fkYAML/node.hpp>
int main() {
std::cout << std::boolalpha << std::is_same<double, fkyaml::node::float_number_type>::value << std::endl;
return 0;
}
output: