Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There should be a way to reset a Node "reference" in the new API. #189

Closed
GoogleCodeExporter opened this issue Mar 30, 2015 · 6 comments
Closed

Comments

@GoogleCodeExporter
Copy link

If you're iterating down a node path, you might want to reset a reference. E.g.:

YAML::Node node = /* something */;
for_each(path.begin(), path.end(), [&node](const std::string& key) {
   node.reset(node[key]);
});

or maybe node.set? I was thinking node.reset to mirror a smart pointer, but 
maybe set would be more natural.

Original issue reported on code.google.com by jbe...@gmail.com on 31 Jan 2013 at 6:44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant