[Property tree review] Error in docs

I just noticed there is a serious error in docs, it states that parsers are in namespaces of their own, (e.g. read_xml is in namespace boost::property_tree::xml_parser). This is correct, but they are also all imported into boost::property_tree namespace by means of using declarations. And they should be used from there. Their presence in other namespaces should be considered an implementation detail, and obviously not documented. I will fix that after review completes. In the meantime please bear in mind that there's not so much namespace bloat as the docs purport ;-). One reason that parser functions _must_ be in property_tree namespace is Koenig lookup, e.g.: boost::property_tree::ptree pt; read_xml("x.xml", pt); // Koenig lookup here Lookup above obviously relies on read_xml being in the same namespace as ptree. Marcin

Marcin Kalicinski wrote:
I just noticed there is a serious error in docs, it states that parsers are in namespaces of their own, (e.g. read_xml is in namespace boost::property_tree::xml_parser). This is correct, but they are also all imported into boost::property_tree namespace by means of using declarations.
What about the related identifiers, like parsing flags? Are they also imported? Sebastian Redl

"Marcin Kalicinski" <kalita@poczta.onet.pl> writes:
One reason that parser functions _must_ be in property_tree namespace is Koenig lookup, e.g.:
boost::property_tree::ptree pt; read_xml("x.xml", pt); // Koenig lookup here
Lookup above obviously relies on read_xml being in the same namespace as ptree.
Why is it important to be able to call read_xml without qualification? -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (3)
-
David Abrahams
-
Marcin Kalicinski
-
Sebastian Redl