This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Sep 2016 22:34:52 +0000
- Subject: [Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace
- Auto-submitted: auto-generated
- References: <bug-59256-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59256
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'm going to commit a workaround in <bits/regex.h> so I don't do this again.
--- a/libstdc++-v3/include/bits/regex.h
+++ b/libstdc++-v3/include/bits/regex.h
@@ -62,6 +62,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename, typename, typename, bool>
class _Executor;
+#ifdef _GLIBCXX_INLINE_VERSION
+#define _GLIBCXX_NAMESPACE_VERSION __7::
+#else
+#define _GLIBCXX_NAMESPACE_VERSION
+#endif
_GLIBCXX_END_NAMESPACE_VERSION
}
@@ -770,7 +775,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
template<typename _Bp, typename _Ap, typename _Cp, typename _Rp,
__detail::_RegexExecutorPolicy, bool>
friend bool
- __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
+ __detail:: _GLIBCXX_NAMESPACE_VERSION
+ __regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
const basic_regex<_Cp, _Rp>&,
regex_constants::match_flag_type);
@@ -1861,7 +1867,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
template<typename _Bp, typename _Ap, typename _Cp, typename _Rp,
__detail::_RegexExecutorPolicy, bool>
friend bool
- __detail::__regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
+ __detail:: _GLIBCXX_NAMESPACE_VERSION
+ __regex_algo_impl(_Bp, _Bp, match_results<_Bp, _Ap>&,
const basic_regex<_Cp, _Rp>&,
regex_constants::match_flag_type);