You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I face the same issue in implementing the same behavior. It renders this library useless, especially since there are no compiler warnings despite marking my class member function const. A contract is broken.
I have the same issue. The assignment semantics for Node makes no sense. Even if it acts as a pointer, accessing a copy should not modify original object. I guess I'll have to use libfyaml...
I just started using
yaml-cpp
and I did navigation from key like:"my.magic.str.value"
to access nested values in YAML files.I did this with code:
So thanks to that I could navigate through tree.
It works fine for first execution then it stops as we modify
_root
...I found this question also: https://stackoverflow.com/questions/43597237/yaml-cpp-modifies-underlying-container-even-for-const-nodes
It would be nice to explain this in tutorial or forbid it somehow. Solution is to use recursion.
E.g.
The text was updated successfully, but these errors were encountered: