>>But would it be better if this gave a different result?
>> signed char n = '\n';
>> std::cout<< "Hello world"<< n;
> of course ;-)
> these are equivalent:
> signed char n = '\n';
> int8_t n = '\n';
> int8_t n = 10;
> therefore I would expect "Hello world10".
> it's the same as this being different:
> float n = '\n';
> std::cout<< "Hello world"<< n;
Perhaps, though I tend to think (apparently not entirely correctly) of
"char" as being equivalent to either "signed char" or "unsigned char".
In any case there's nothing that clang/libcxx ought to do. The standard
is what it is. (Perhaps a stream which handles signed and/or unsigned
chars differently would be useful and that seems like a plausible
extension, but I doubt it's really worth adding.)
cfe-dev mailing list
[hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev