Skip to content

Defined in header <fkYAML/node.hpp>

fkyaml::basic_node::sequence

static basic_node sequence();
static basic_node sequence(const sequence_type& seq);
static basic_node sequence(sequence_type&& seq);

The factory method which constructs a basic_node with the node_t::SEQUENCE type from a sequence node value.
Calling this API with no arguments will constructs a basic_node with an empty sequence node value.
The resulting basic_node has the node_t::SEQUENCE type.

Example
#include <iostream>
#include <fkYAML/node.hpp>

int main() {
    fkyaml::node::sequence_type s = {fkyaml::node(true), fkyaml::node(false)};
    fkyaml::node n = fkyaml::node::sequence(s);
    std::cout << n << std::endl;
    return 0;
}

output:

- true
- false

See Also