
On 9/3/09, Eric Niebler
Maurizio Vitale wrote:
Proto behaves in a different way when matching terminal<char> and terminal<int>. The only difference I'm aware is that it is implementation defined whether 'char' means 'signed char' or 'unsigned char' but it has to mean one of the two.
That's where you're mistaken. char, signed char and unsigned char are 3 distinct types.
Yes. In "The C++ Programming Language, 3rd Ed.", Bjarne Stroustrup says that sign of a "char" type is implementation defined. A "char" type must behave identically to "signed char" or "unsigned char" but the three char types are distinct, pointers to these distinct char types can't be mixed, assigning too large a value to "signed char" is undefined and advises to prefer plain "char" over signed char and unsigned char to alleviate portability issues. (4.3, page 72 & 4.10 page 85). Best regards, -Asif