This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [regex, libstdc++/71500, patch] Fix icase on bracket expression
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Tim Shen <timshen at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Sat, 11 Jun 2016 13:01:41 +0100
- Subject: Re: [regex, libstdc++/71500, patch] Fix icase on bracket expression
- Authentication-results: sourceware.org; auth=none
- References: <CAG4ZjN=tjmJC40hBBkJ3FKpg5YKmJO4ZVmQbJ-RDE-JwUa3RKQ at mail dot gmail dot com>
On 11/06/16 00:53 -0700, Tim Shen wrote:
diff --git a/libstdc++-v3/include/bits/regex_compiler.h b/libstdc++-v3/include/bits/regex_compiler.h
index 410d61b..d545c04 100644
--- a/libstdc++-v3/include/bits/regex_compiler.h
+++ b/libstdc++-v3/include/bits/regex_compiler.h
@@ -235,8 +235,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_StrTransT
_M_transform(_CharT __ch) const
{
- return _M_transform_impl(__ch, typename integral_constant<bool,
- __collate>::type());
+ return _M_transform_impl(
+ _M_translate(__ch),
+ typename integral_constant<bool, __collate>::type());
N.B. The "typename" and "::type" are redundant here, because it names
the same type as the integral_constant itself, and you could
use __bool_constant<__collate> instead:
return _M_transform_impl(_M_translate(__ch),
__bool_constant<__collate>());
OK for trunk without the redundant typename ...::type, your choice
whether to use __bool_constant or not.
Will this fix apply cleanly to the branches too?