Defined in header <fkYAML/node.hpp>
fkyaml::basic_node::string_type¶
The type used to store integer node values and keys for mapping nodes.
The type is defined by the template parameter StringType
.
If not explicitly specified, the default type std::string
is defined.
With the decided type, string values are stored directly inside a basic_node
.
Note that string objects are stored as a pointer to an allocated memory area on the heap in a basic_node
so that the internal storage size will at most be 8 bytes.
Examples¶
Example
#include <iomanip>
#include <iostream>
#include <string>
#include <type_traits>
#include <fkYAML/node.hpp>
int main() {
std::cout << std::boolalpha << std::is_same<std::string, fkyaml::node::string_type>::value << std::endl;
return 0;
}
output: