|
Boost : |
From: Marcin Kalicinski (kalita_at_[hidden])
Date: 2006-04-19 12:50:14
> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk