The following code attempts to emit 2 documents each with a local tag:
YAML::Emitter theEmitter;
for (int i = 0; i < 2; ++i)
{
theEmitter << YAML::BeginDoc;
theEmitter << YAML::LocalTag("The_Tag");
theEmitter << YAML::BeginSeq;
theEmitter << "Some Value";
theEmitter << YAML::EndSeq;
theEmitter << YAML::EndDoc;
}
std::cout << theEmitter.c_str() << std::endl;
I expected the code to print:
--- !The_Tag
- Some Value
...
--- !The_Tag
- Some Value
...
However the actual print is:
--- !The_Tag
- Some Value
...
--- !The_Tag
It looks like the call to YAML::LocalTag("The_Tag") leaves the emitter in an error state - however no exception is thrown.
If I remove the call to YAML::LocalTag("The_Tag") the print is OK:
---
- Some Value
...
---
- Some Value
...
I'm using yaml-cpp 0.5.2 with Xcode 5 on Mac OS 10.9.
Does not happen with yaml-cpp 0.3.0.
Thanks,
Shai
The following code attempts to emit 2 documents each with a local tag:
I expected the code to print:
However the actual print is:
It looks like the call to YAML::LocalTag("The_Tag") leaves the emitter in an error state - however no exception is thrown.
If I remove the call to YAML::LocalTag("The_Tag") the print is OK:
I'm using yaml-cpp 0.5.2 with Xcode 5 on Mac OS 10.9.
Does not happen with yaml-cpp 0.3.0.
Thanks,
Shai