diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-11-19 09:34:59 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-11-19 09:34:59 +0000 |
commit | 5ecaaf98dc6678fab9607822ec083830c536eb68 (patch) | |
tree | fa79e50da45da8b3112b49222c77cef7b9a9176e | |
parent | 63b887119024128efaeb122193c935397c2572e9 (diff) | |
download | gcc-5ecaaf98dc6678fab9607822ec083830c536eb68.zip gcc-5ecaaf98dc6678fab9607822ec083830c536eb68.tar.gz gcc-5ecaaf98dc6678fab9607822ec083830c536eb68.tar.bz2 |
libstdc++: Fix declarations of variable templates
This code is invalid and rejected by other compilers (see PR 92576).
* include/bits/regex.h (ranges::__detail::__enable_view_impl): Fix
declaration.
* include/bits/stl_multiset.h (ranges::__detail::__enable_view_impl):
Likewise.
* include/bits/stl_set.h (ranges::__detail::__enable_view_impl):
Likewise.
* include/bits/unordered_set.h (ranges::__detail::__enable_view_impl):
Likewise.
* include/debug/multiset.h (ranges::__detail::__enable_view_impl):
Likewise.
* include/debug/set.h (ranges::__detail::__enable_view_impl): Likewise.
* include/debug/unordered_set (ranges::__detail::__enable_view_impl):
Likewise.
From-SVN: r278440
-rw-r--r-- | libstdc++-v3/ChangeLog | 16 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/regex.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_multiset.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_set.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/unordered_set.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/multiset.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/set.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/unordered_set | 2 |
8 files changed, 23 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6f49312..a8fbd3a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,19 @@ +2019-11-19 Jonathan Wakely <jwakely@redhat.com> + + * include/bits/regex.h (ranges::__detail::__enable_view_impl): Fix + declaration. + * include/bits/stl_multiset.h (ranges::__detail::__enable_view_impl): + Likewise. + * include/bits/stl_set.h (ranges::__detail::__enable_view_impl): + Likewise. + * include/bits/unordered_set.h (ranges::__detail::__enable_view_impl): + Likewise. + * include/debug/multiset.h (ranges::__detail::__enable_view_impl): + Likewise. + * include/debug/set.h (ranges::__detail::__enable_view_impl): Likewise. + * include/debug/unordered_set (ranges::__detail::__enable_view_impl): + Likewise. + 2019-11-18 Jonathan Wakely <jwakely@redhat.com> * include/std/thread: Reduce header dependencies. diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h index 4999436..4a19065 100644 --- a/libstdc++-v3/include/bits/regex.h +++ b/libstdc++-v3/include/bits/regex.h @@ -2061,7 +2061,7 @@ _GLIBCXX_END_NAMESPACE_CXX11 #if __cplusplus > 201703L namespace ranges::__detail { - template<typename _Tp> inline constexpr bool __enable_view_impl; + template<typename _Tp> extern inline const bool __enable_view_impl; template<typename _Bi_iter, typename _Alloc> inline constexpr bool __enable_view_impl<match_results<_Bi_iter, _Alloc>> = false; diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h index 9e34961..14207e6 100644 --- a/libstdc++-v3/include/bits/stl_multiset.h +++ b/libstdc++-v3/include/bits/stl_multiset.h @@ -1042,7 +1042,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER #if __cplusplus > 201703L namespace ranges::__detail { - template<typename _Tp> inline constexpr bool __enable_view_impl; + template<typename _Tp> extern inline const bool __enable_view_impl; template<typename _Key, typename _Compare, typename _Alloc> inline constexpr bool __enable_view_impl<_GLIBCXX_STD_C::multiset<_Key, _Compare, _Alloc>> diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h index 135d57a..85f26c2 100644 --- a/libstdc++-v3/include/bits/stl_set.h +++ b/libstdc++-v3/include/bits/stl_set.h @@ -1054,7 +1054,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER #if __cplusplus > 201703L namespace ranges::__detail { - template<typename _Tp> inline constexpr bool __enable_view_impl; + template<typename _Tp> extern inline const bool __enable_view_impl; template<typename _Key, typename _Compare, typename _Alloc> inline constexpr bool __enable_view_impl<_GLIBCXX_STD_C::set<_Key, _Compare, _Alloc>> = false; diff --git a/libstdc++-v3/include/bits/unordered_set.h b/libstdc++-v3/include/bits/unordered_set.h index 98943fb..b138d02 100644 --- a/libstdc++-v3/include/bits/unordered_set.h +++ b/libstdc++-v3/include/bits/unordered_set.h @@ -1775,7 +1775,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER #if __cplusplus > 201703L namespace ranges::__detail { - template<typename _Tp> inline constexpr bool __enable_view_impl; + template<typename _Tp> extern inline const bool __enable_view_impl; template<typename _Val, typename _Hash, typename _Eq, typename _Alloc> inline constexpr bool __enable_view_impl<_GLIBCXX_STD_C::unordered_set<_Val, _Hash, _Eq, diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h index 00c5bcc..62c7672 100644 --- a/libstdc++-v3/include/debug/multiset.h +++ b/libstdc++-v3/include/debug/multiset.h @@ -635,7 +635,7 @@ namespace __debug _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace ranges::__detail { - template<typename _Tp> inline constexpr bool __enable_view_impl; + template<typename _Tp> extern inline const bool __enable_view_impl; template<typename _Key, typename _Compare, typename _Alloc> inline constexpr bool __enable_view_impl<std::__debug::multiset<_Key, _Compare, _Alloc>> diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index 16eee29..8d0852a 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -646,7 +646,7 @@ namespace __debug _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace ranges::__detail { - template<typename _Tp> inline constexpr bool __enable_view_impl; + template<typename _Tp> extern inline const bool __enable_view_impl; template<typename _Key, typename _Compare, typename _Alloc> inline constexpr bool __enable_view_impl<std::__debug::set<_Key, _Compare, _Alloc>> = false; diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 5dbb754..4b814cb 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -1187,7 +1187,7 @@ namespace __debug _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace ranges::__detail { - template<typename _Tp> inline constexpr bool __enable_view_impl; + template<typename _Tp> extern inline const bool __enable_view_impl; template<typename _Val, typename _Hash, typename _Eq, typename _Alloc> inline constexpr bool __enable_view_impl<std::__debug::unordered_set<_Val, _Hash, _Eq, _Alloc>> |