|
Boost : |
From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-11-10 05:16:05
In message <B6309032.3B8%darylew_at_[hidden]>, Daryle Walker
<darylew_at_[hidden]> writes
>I'm restricting the specializations to lexical_cast's that use
>std::basic_string because, as far as I know, std::basic_string's of
>different types aren't made to work together. This means that problems will
>ensue when trying to work the std::string-based std::stringstream with a
>different std::basic_string type. When only one of the external types is a
>std::basic_string, we can get around the problem by using the
>std::basic_stringstream with the same CharType and TraitsType as the given
>std::basic_string. We could use other stategies when both external types
>are from the std::basic_string family. Or we can punt the entire issue and
>declare that using std::basic_string types besides std::string are
>undefined.
>
>One question to help answer this problem: what happens when I print a
>std::basic_string<Ch1, Tr1> via a std::basic_ostream<Ch2, Tr2>? How are the
>differing character types and/or trait strategies resolved?
I'm with you now. Yes, this has been brought up before, but I'm not sure
that the current lexical_cast is the version to solve it in. I suspect
that there are other cases that also fall into this category. I wonder
if this can be resolved with a lexical_cast_traits approach?
Kevlin
____________________________________________________________
Kevlin Henney phone: +44 117 942 2990
Curbralan Limited mobile: +44 7801 073 508
mailto:kevlin_at_[hidden] fax: +44 870 052 2289
http://www.curbralan.com
____________________________________________________________
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk