
19 Apr
2006
19 Apr
'06
4:50 p.m.
I consider this interface most elegant (because ADL also works):
namespace boost { template< class Traits > void read_xml( std::basic_istream<typename Traits::char_type>& str, basic_ptree<Traits>& tree, int flags = 0 ); }
The reason why parsers are templated on tree type is that basic_ptree originally had more template parameters than now (just the traits), so replicating them everywhere looked like a potential maintenance problem. Marcin