
Vladimir Batov <vb.mail.247 <at> gmail.com> writes:
alex <alexhighviz <at> hotmail.com> writes: ... RE#4: The following is not compiling because of the way it uses enable_if in sstream.hpp.
boost::cstringstream_converter cnv; std::string str = boost::convert<std::string >::from("hello", cnv).value();
JUSTIFICATION: It's not compiling because applying std::stringstream to such a trivial type transformation is wasteful.
TODO: Add "char const*->std::string" transformation specialization to sstream-based converter.
Hmm, now I am not sure if I agree with my own "justification". :-) What if I want to apply std::sstream-provided formatting facilities to convert from, say, a "0xFF" hex string to a decimal string? Is it one of "char const*->std::string" transformations that you had in mind? I've never thought of this and never tried... will it even work with std::sstream?