On Mon, Apr 28, 2014 at 11:05 AM, Jonathan Wakely <jwak...@redhat.com> wrote: > There is a well-defined mapping from every unsigned char in the range > [0,255] to char and back, so conversions between char and unsigned > char are fine. If we used a larger type then we would get the wrong result > when char is signed, because (size_t)(char)-1 != (unsigned char)(char)-1
You are right. I've missed this. > sizeof(wchar_t) is 4 on unix-like systems, but a cache for char16_t > wouldn't be totally crazy. > > If you prefer I will not remove the uses of _CharT and _UnsignedCharT > and won't assume the cache is only used for char. There are still some > simplifications we can make. Yes, I (now again) prefer _UnsignedCharT. But it's just kind of personal flavor, I suppose? > Thanks, I'll clean the patch up and commit it soon. Thanks again :) -- Regards, Tim Shen