|
Boost : |
Subject: [boost] [property_tree] streaming operators
From: Chris Meyer (cmeyer1969+boost_at_[hidden])
Date: 2009-05-12 20:34:50
More on property_tree:
It would be nice if the default translator did not use the << and >>
operators by default. In my software, I use << to stream a debugging
description of an object -- so it is useless for archiving purposes.
Instead, the detail::translator could define and use
template <class Ch, class T> inline void
writeToStream(std::basic_ostream<Ch> &os, const T &value) { os << value; }
template <class Ch, class T> inline void
readFromStream(std::basic_istream<Ch> &is, T &value) { is >> value; }
Then clients of the library would have more flexibility in
implementing the streaming operations by providing specializations of
these functions.
(These functions would be used in place of the stream >> and << calls
in detail::extractor::operator() and it's specializations).
Is this list the right place for these requests or is there a better
place to put them so that they get tracked?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk