This code:
std::cout << "std::cout for 2112 = " << 2112 << 'n';
YAML::Emitter out;
out << 2112;
std::cout << "Emitter for 2112 = " << out.c_str() << 'n';
produces this output:
std::cout for 2112 = 2112
Emitter for 2112 = 2,112
I think this shows that the comma is not added to the yaml string because of some locale / std stream settings, and seems to be coming from yaml-cpp itself.
I could convert the number to a string first and send this to the Emitter
, but is there a simpler way to prevent the thousands separator from being included in the yaml string?