From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-04-16 16:16:18
"Noah Stein" <noah_at_[hidden]> wrote in message
> Yes, and to add to this tangent, 3.9.1p1 states "Plain char, signed char,
> and unsigned char are three distinct types." Strangely, 3.9p2 talks about
> how "... the underlying bytes making up the object can be copied into an
> array of char or unsigned char. If the content of the array of char or
> unsigned char is copied back into the object, the object shall
> hold its original value." I guess there's no requirement that this
> work properly with signed chars! :)
I recall it is stated elsewhere that the unsigned versions of types must
have the same layout and alignment, so you can memcpy one over another.
Thanks Alan for correcting me by pointing the relevant place in the standard
about the legality of sole "unsigned".
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk