[libcxx-commits] [libcxx] [libc++] Avoid including shared_ptr.h in basic_ostream.h (PR #121049)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 24 03:41:52 PST 2024
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/121049
None
>From 038441cc643c8dca970569af791f8bf253dd9ca6 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Tue, 24 Dec 2024 12:37:30 +0100
Subject: [PATCH] [libc++] Avoid including shared_ptr.h in basic_ostream.h
---
libcxx/include/__fwd/memory.h | 3 +++
libcxx/include/__ostream/basic_ostream.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/libcxx/include/__fwd/memory.h b/libcxx/include/__fwd/memory.h
index b9e151855ad7d8..564000997dec6c 100644
--- a/libcxx/include/__fwd/memory.h
+++ b/libcxx/include/__fwd/memory.h
@@ -20,6 +20,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
class _LIBCPP_TEMPLATE_VIS allocator;
+template <class _Tp>
+class _LIBCPP_TEMPLATE_VIS shared_ptr;
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___FWD_MEMORY_H
diff --git a/libcxx/include/__ostream/basic_ostream.h b/libcxx/include/__ostream/basic_ostream.h
index 6d24171bc0d6cf..cf4d26167aebde 100644
--- a/libcxx/include/__ostream/basic_ostream.h
+++ b/libcxx/include/__ostream/basic_ostream.h
@@ -14,7 +14,7 @@
#if _LIBCPP_HAS_LOCALIZATION
# include <__exception/operations.h>
-# include <__memory/shared_ptr.h>
+# include <__fwd/memory.h>
# include <__memory/unique_ptr.h>
# include <__new/exceptions.h>
# include <__ostream/put_character_sequence.h>
More information about the libcxx-commits
mailing list