Defined in header <fkYAML/node.hpp>
fkyaml::basic_node::is_scalar¶
Tests whether the node is a scalar node: either a null, boolean, integer, floating point or string node.
Return Value¶
true if the node is a scalar node, false otherwise.  
Examples¶
Example
#include <iomanip>
#include <iostream>
#include <fkYAML/node.hpp>
int main() {
    // create YAML nodes.
    fkyaml::node null_node;
    fkyaml::node boolean_node = true;
    fkyaml::node integer_node = 256;
    fkyaml::node float_node = 3.14;
    fkyaml::node string_node = "Hello, world!";
    // check if the nodes are a scalar by calling is_scalar()
    std::cout << std::boolalpha;
    std::cout << null_node.is_scalar() << std::endl;
    std::cout << boolean_node.is_scalar() << std::endl;
    std::cout << integer_node.is_scalar() << std::endl;
    std::cout << float_node.is_scalar() << std::endl;
    std::cout << string_node.is_scalar() << std::endl;
    return 0;
}
output: