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

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


Author: Nikolas Klauser
Date: 2024-12-22T00:56:06+01:00
New Revision: 9b0c8ef37a344769e90d769dbeb0060afb260483

URL: https://github.com/llvm/llvm-project/commit/9b0c8ef37a344769e90d769dbeb0060afb260483
DIFF: https://github.com/llvm/llvm-project/commit/9b0c8ef37a344769e90d769dbeb0060afb260483.diff

LOG: [libc++] Don't declare pmr::polymorphic_allocator before C++17 (#120850)

Fixes #120790

Added: 
    

Modified: 
    libcxx/include/__fwd/memory_resource.h

Removed: 
    


################################################################################
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


        


More information about the libcxx-commits mailing list