Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2007-09-27 14:01:24


James Porter wrote:
> It doesn't do it in a portable manner.
OK, so that's what you meant. Yeah, that's a problem.
> I'd argue that
> basic_string<wchar_t> isn't exactly Unicode at all, though I'm being
> nit-picky. char_traits<wchar_t>::state_type is mbstate_t,
That has nothing to do with what basic_string<wchar_t> is, though,
because that state is to be used when converting the string to an
external encoding. It just shows how screwed-up the current system is:
char_traits<Ch>::state_type is a type that should be able to hold the
shift state when converting to a (runtime-specified through the locale)
external encoding - but the shift state is specific to the _external
encoding_, not the internal one. It doesn't make any sense whatsoever
that char_traits for the wide character type (and thus the indicator of
the _internal encoding_) should hold this type.

Sebastian Redl


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk