diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-06-02 16:41:26 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-06-22 20:58:43 +0100 |
commit | b5a29741db11007e37d8d4ff977b89a8314abfda (patch) | |
tree | 62f3297a5c305970130462b823e36967c681dd32 | |
parent | 6c63cb231e4cf99552bb7904ebe402f7adcafda4 (diff) | |
download | gcc-b5a29741db11007e37d8d4ff977b89a8314abfda.zip gcc-b5a29741db11007e37d8d4ff977b89a8314abfda.tar.gz gcc-b5a29741db11007e37d8d4ff977b89a8314abfda.tar.bz2 |
libstdc++: Remove garbage collection support for C++23 [P2186R2]
This removes the non-functional garbage colection support from <memory>,
as proposed for C++23 by P2186R2.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/std/memory (declare_reachable, undeclare_reachable)
(declare_no_pointers, undeclare_no_pointers, get_pointer_safety)
(pointer_safety): Only define for C++11 to C++20 inclusive.
* testsuite/20_util/pointer_safety/1.cc: Do not run for C++23.
-rw-r--r-- | libstdc++-v3/include/std/memory | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/20_util/pointer_safety/1.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory index f19de27..da64be2 100644 --- a/libstdc++-v3/include/std/memory +++ b/libstdc++-v3/include/std/memory @@ -87,7 +87,7 @@ # include <bits/uses_allocator_args.h> #endif -#if __cplusplus >= 201103L +#if __cplusplus >= 201103L && __cplusplus <= 202002L namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -132,7 +132,7 @@ get_pointer_safety() noexcept { return pointer_safety::relaxed; } _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#endif // C++11 +#endif // C++11 to C++20 #if __cplusplus >= 201703L // Parallel STL algorithms diff --git a/libstdc++-v3/testsuite/20_util/pointer_safety/1.cc b/libstdc++-v3/testsuite/20_util/pointer_safety/1.cc index 7d9a425..bfacbce 100644 --- a/libstdc++-v3/testsuite/20_util/pointer_safety/1.cc +++ b/libstdc++-v3/testsuite/20_util/pointer_safety/1.cc @@ -15,7 +15,7 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-do run { target c++11 } } +// { dg-do run { target { c++11 && { ! c++23 } } } } #include <memory> #include <testsuite_hooks.h> |