Defined in header <fkYAML/node.hpp>
fkyaml::basic_node::get_yaml_version_type¶
Returns the YAML specification version applied to a basic_node
.
Return Value¶
The YAML specification version applied to a basic_node.
YAML version | Return Value |
---|---|
1.1 | yaml_version_type::VERSION_1_1 |
1.2 | yaml_version_type::VERSION_1_2 |
Examples¶
Example
#include <iomanip>
#include <iostream>
#include <fkYAML/node.hpp>
int main() {
// A `fkyaml::node` object has `yaml_version_t::VER_1_2` by default.
fkyaml::node n;
std::cout << std::boolalpha << (n.get_yaml_version_type() == fkyaml::yaml_version_type::VERSION_1_2) << std::endl;
return 0;
}
output: