Defined in header <fkYAML/node.hpp>
fkyaml::basic_node::sequence_type¶
The type used to store sequence node values.
The type is defined by the template parameter SequenceType
.
If not explicitly specified, the default type std::vector
is defined.
With the decided container type, the type of sequence objects will then be decided in the form of SequenceType<basic_node>
with which sequence objects are stored inside a basic_node
.
Note that sequence 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 <type_traits>
#include <vector>
#include <fkYAML/node.hpp>
int main() {
std::cout << std::boolalpha << std::is_same<std::vector<fkyaml::node>, fkyaml::node::sequence_type>::value
<< std::endl;
return 0;
}
output: