Skip to content

Instantly share code, notes, and snippets.

@kovrov
Created February 24, 2015 00:48
Show Gist options
  • Select an option

  • Save kovrov/f797682f0d14b204f4ee to your computer and use it in GitHub Desktop.

Select an option

Save kovrov/f797682f0d14b204f4ee to your computer and use it in GitHub Desktop.
Boost property_tree traverse
#include <boost/property_tree/ptree.hpp>
void traverse(const boost::property_tree::ptree &pt)
{
for (const auto &pair : pt) {
if (!pair.second.empty()) {
traverse(pair.second);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment