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

Jonathan Wakely jwakely@redhat.com
Sat Jun 11 12:01:00 GMT 2016


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?



More information about the Libstdc++ mailing list