Writing a scalar value

auto scalar=x::newscalarnode::create("Albuquerque");

scalar->anchor="left_turn_location";

x::yaml::newscalarnode is a x::yaml::newnode that writes a scalar value in a YAML. The only required parameter is the scalar's value. LibYAML document requires the value to use the UTF-8 codeset. Other, optional parameters to the constructor are:

There is no parameter for the optional anchor for any subsequent alias references to this scalar object. The anchor needs to be set manually, after constructing the scalar object, as shown in the example above.