[libcxx-commits] [libcxx] [libc++] Don't declare pmr::polymorphic_allocator before C++17 (PR #120850)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Dec 21 10:40:09 PST 2024
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/120850
Fixes #120790
>From 30676835fa5db42f6312872cf8884f2bc98c118c Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Sat, 21 Dec 2024 19:39:39 +0100
Subject: [PATCH] [libc++] Don't declare pmr::polymorphic_allocator before
C++17
---
libcxx/include/__fwd/memory_resource.h | 4 ++++
1 file changed, 4 insertions(+)
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