Defined in header <fkYAML/node.hpp>
fkyaml::basic_node::get_yaml_version_type¶
Returns the version of the YAML format applied for the basic_node
object.
Return Value¶
The version of the YAML format applied to the basic_node object.
YAML version | Return Value |
---|---|
1.1 | yaml_version_type::VERSION_1_1 |
1.2 | yaml_version_type::VERSION_1_2 |
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: