Created
February 24, 2015 00:48
-
-
Save kovrov/f797682f0d14b204f4ee to your computer and use it in GitHub Desktop.
Boost property_tree traverse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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