This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch 1/N] std::regex refactoring - _BracketMatcher
- From: Tim Shen <timshen91 at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 28 Apr 2014 11:18:24 -0400
- Subject: Re: [patch 1/N] std::regex refactoring - _BracketMatcher
- Authentication-results: sourceware.org; auth=none
- References: <20140428124003 dot GW928 at redhat dot com> <CAPrifDkixPm8=RyGVdXHVQbp=s+cZeYL71wX8sQsm1koVedvKA at mail dot gmail dot com> <20140428150512 dot GA928 at redhat dot com>
On Mon, Apr 28, 2014 at 11:05 AM, Jonathan Wakely <jwakely@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