[libcxx-commits] [PATCH] D112869: [libc++] Implement P2186R2 (Remove Garbage Collection)

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Oct 30 05:44:56 PDT 2021


philnik created this revision.
philnik added a reviewer: Quuxplusone.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112869

Files:
  libcxx/include/__memory/pointer_safety.h
  libcxx/test/std/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp
  libcxx/test/std/utilities/memory/util.dynamic.safety/declare_reachable.pass.cpp
  libcxx/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp


Index: libcxx/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp
===================================================================
--- libcxx/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp
+++ libcxx/test/std/utilities/memory/util.dynamic.safety/get_pointer_safety.pass.cpp
@@ -10,7 +10,7 @@
 
 // pointer_safety get_pointer_safety();
 
-// UNSUPPORTED: c++03
+// REQUIRES: c++11 || c++14 || c++17 || c++20
 
 #include <memory>
 #include <cassert>
Index: libcxx/test/std/utilities/memory/util.dynamic.safety/declare_reachable.pass.cpp
===================================================================
--- libcxx/test/std/utilities/memory/util.dynamic.safety/declare_reachable.pass.cpp
+++ libcxx/test/std/utilities/memory/util.dynamic.safety/declare_reachable.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// UNSUPPORTED: c++03
+// REQUIRES: c++11 || c++14 || c++17 || c++20
 
 // <memory>
 
Index: libcxx/test/std/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp
===================================================================
--- libcxx/test/std/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp
+++ libcxx/test/std/utilities/memory/util.dynamic.safety/declare_no_pointers.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// UNSUPPORTED: c++03
+// REQUIRES: c++11 || c++14 || c++17 || c++20
 
 // <memory>
 
Index: libcxx/include/__memory/pointer_safety.h
===================================================================
--- libcxx/include/__memory/pointer_safety.h
+++ libcxx/include/__memory/pointer_safety.h
@@ -19,7 +19,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCPP_CXX03_LANG) && _LIBCPP_STD_VER <= 20
 
 enum class pointer_safety : unsigned char {
   relaxed,
@@ -45,7 +45,7 @@
     return static_cast<_Tp*>(__undeclare_reachable(__p));
 }
 
-#endif // !C++03
+#endif // !C++03 && C++ <= 20
 
 _LIBCPP_END_NAMESPACE_STD
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112869.383582.patch
Type: text/x-patch
Size: 2105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211030/1599eb6a/attachment.bin>


More information about the libcxx-commits mailing list