Skip to content

Defined in header <fkYAML/node.hpp>

fkyaml::basic_node::is_mapping

bool is_mapping() const noexcept;

Tests whether the node value type is node_t::MAPPING.

Return Value

true if the type is node_t::MAPPING, false otherwise.

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

int main() {
    fkyaml::node n = {{"foo", true}};
    std::cout << std::boolalpha << n.is_mapping() << std::endl;
    return 0;
}

output:

true

See Also