Boost 1.46.1, Property Tree: How to iterate through ptree receiving sub ptrees?
问题 First of all I shall say that I think I got how it should be done but my code will not compile any way I try. I based my assumption on this official example of empty ptree trick. There you can find next line: const ptree &settings = pt.get_child("settings", empty_ptree<ptree>()); Which shows that it is (or should be) possible to get subptree out from ptree. So I assumed we could iterate thru ptree with something like BOOST_FOREACH in such manner: BOOST_FOREACH(const boost::property_tree: