Defined in header <fkYAML/node.hpp>
fkyaml::basic_node::string_type¶
The type used to store integer node values and keys for mapping nodes.
To store string objects in basic_node
class, the type is defined by the template parameter StringType
which chooses the type to use for string objects.
If not explicitly specified, the default type std::string
will be chosen.
Note that string objects are stored as pointers to the decided type in a basic_node
so that the internal storage size will at most be 8 bytes.
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: