From: Mattias Flodin (flodin_at_[hidden])
Date: 2002-04-06 02:54:07
When you do, please try not to leave the Unicode question out of the
discussion. A separate name such as to_wstring seems insufficient to me because
there are times when you cannot know beforehand whether the string type you're
casting to is single-byte or Unicode (e.g. when writing generic code). I have
posted a plausible solution (using partial specialization on the contained
character type) before in
In fact, functionality for directly converting between ASCII and Unicode might
also be something that people would consider to be a "lexical cast." Perhaps
this is not something that everyone feels would be of use to the common
programmer, but to programmers working with international applications I think
it would. The standard already has half-hearted support for these people. Why
not aim for making it whole-hearted (certainly, that would take much more work
than just fiddling with lexical_cast, but it's a start...).
On Fri, Apr 05, 2002 at 09:19:50PM -0500, Beman Dawes wrote:
> At 05:52 PM 4/3/2002, Jan Langer wrote:
> >>I also added this to the Wiki page on Lexical Cast for the next time
> >this comes up....
> >although the archive seems to handle some threads incorrectly, i read
> >through the mentioned messages and there are several requests for
> >simple change and there are no serious concerns. the only question is
> >whether to make it a new function to_string or to specialize
> >lexical_cast for std::string.
> >so why isn't it done?
> >is there more need for discussion or is there no one who wants to do
> >the actual work? or does it need a formal review ;-) ?
> I've started to pester Kevlin Henney. If he isn't going to work on
> lexical_cast issues, we ought to let someone else have a go at them.
> But there are tricky issues involved, so I hope anyone working on a
> proposal will run it by Kevlin for his opinion.
-- Mattias Flodin <flodin_at_[hidden]> - http://www.cs.umu.se/~flodin/ Room NADV 102 Department of Computing Science Umeå University S-901 87 Umeå, Sweden -- "There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." --Jeremy S. Anderson
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk