This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [regex, libstdc++/71500, patch] Fix icase on bracket expression


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]