[libcxx-commits] [libcxx] [libc++] Don't declare pmr::polymorphic_allocator before C++17 (PR #120850)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Dec 21 15:56:40 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

<details>
<summary>Changes</summary>

Fixes #<!-- -->120790


---
Full diff: https://github.com/llvm/llvm-project/pull/120850.diff


1 Files Affected:

- (modified) libcxx/include/__fwd/memory_resource.h (+4) 


``````````diff
diff --git a/libcxx/include/__fwd/memory_resource.h b/libcxx/include/__fwd/memory_resource.h
index d68b2c2b631543..ca9d3770945c81 100644
--- a/libcxx/include/__fwd/memory_resource.h
+++ b/libcxx/include/__fwd/memory_resource.h
@@ -15,6 +15,8 @@
 #  pragma GCC system_header
 #endif
 
+#if _LIBCPP_STD_VER >= 17
+
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace pmr {
@@ -24,4 +26,6 @@ class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator;
 
 _LIBCPP_END_NAMESPACE_STD
 
+#endif // _LIBCPP_STD_VER >= 17
+
 #endif // _LIBCPP___FWD_MEMORY_RESOURCE_H

``````````

</details>


https://github.com/llvm/llvm-project/pull/120850


More information about the libcxx-commits mailing list