Skip to content

Defined in header <fkYAML/node.hpp>

fkyaml::basic_node::is_boolean

bool is_boolean() const noexcept;

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

Return Value

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

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

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

output:

true

See Also