1 Nov
2010
1 Nov
'10
10:42 p.m.
Paul Graphov wrote:
Hello Boost Users,
boost::lexical_cast fails to compile when both Target and Source template parameters are std::basic_string instantiations with different traits because deduce_char_traits class template has two suitable instantiations which are ambiguous.
<question mode> Traits is passed to basic_stringstream. If they are different, which should be picked? Though, if both Source and Target are basic_strings, does the stream object inside lexical_cast use Traits class at all? Not sure it's feasible to support different traits in the current implementation but it should be simple if we make string to string conversion a special case and shorten it to: return Target(source.begin(), source.end()); Alex