[libcxx-commits] [libcxx] ffc7380 - [libc++] Avoid including shared_ptr.h in basic_ostream.h (#121049)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 24 07:18:34 PST 2024


Author: Nikolas Klauser
Date: 2024-12-24T16:18:25+01:00
New Revision: ffc7380ff4808fcc21350a39caf7f34073b41697

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

LOG: [libc++] Avoid including shared_ptr.h in basic_ostream.h (#121049)

Added: 
    

Modified: 
    libcxx/include/__fwd/memory.h
    libcxx/include/__ostream/basic_ostream.h

Removed: 
    


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