Skip to content

Conversation

@philnik777
Copy link
Contributor

Fixes #120790

@philnik777 philnik777 marked this pull request as ready for review December 21, 2024 23:56
@philnik777 philnik777 requested a review from a team as a code owner December 21, 2024 23:56
@philnik777 philnik777 merged commit 9b0c8ef into llvm:main Dec 21, 2024
64 checks passed
@philnik777 philnik777 deleted the hide_polymorphic_allocator branch December 21, 2024 23:56
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 21, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 21, 2024

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[libc++] std::pmr::polymorphic_allocator is declared in all language modes

2 participants