
13 Oct
2012
13 Oct
'12
9:43 p.m.
On Sat, Oct 13, 2012 at 11:14:30PM +0200, Olaf van der Spek wrote:
On Sat, Oct 13, 2012 at 10:35 PM, Jochen Wilhelmy <jochen.wilhelmy@googlemail.com> wrote:
another question is why does lexical_cast treat int8_t and uint8_t like char? technically I see no reason for this as c++ has three types: char, signed char and unsigned char.
I might be wrong, but aren't there only two types, signed char and unsigned char, with unqualified char being equivalent to one of them (depending on platform)?
They are three distinct types. The signedness (and thus the range of values it can take on) of plain char is the same as one of the unsigned/signed char, but it's still a distinct type, see C++11 3.9.1/1. -- Lars Viklund | zao@acc.umu.se