![]() |
Boost : |
From: Martin Adrian (adrianm_at_[hidden])
Date: 2006-05-05 09:45:25
Jarrad Waterloo <jwaterloo <at> dynamicquest.com> writes:
> // No separator
>
> template<class Type> Type get(const tr1_or_boost::array<key_type,T>& path,
> const Type &default_value, const std::locale &loc = std::locale()) const;
>
> template<class CharType> std::basic_string<CharType> get(const
> tr1_or_boost::array<key_type,T>& path, const CharType *default_value, const
> std::locale &loc = std::locale()) const;
Why not
template <class IteratorT>
string_type get(IteratorT beg, IteratorT end);
template <class IteratorT>
string_type get(IteratorT beg, IteratorT end, const string_type::value_type*
default_value);
I don't really se the need for the converting get functions.
Why is pt.get<double>(path) better than lexical_cast<double>(pt.get(path)).
(or string_to or atof)
> // No separator
>
> template<class Type> basic_ptree &put(const tr1_or_boost::array<key_type,T>&
> path, const Type &value, bool do_not_replace = false, const std::locale &loc
> = std::locale());
Same here: why not
pt.put(path.begin(), path.end(), lexical_cast<string>(val))
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk