[libc++] Split __allocator_destructor out of shared_ptr.h

Reviewed By: ldionne, huixie90, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D134479

NOKEYCHECK=True
GitOrigin-RevId: 59ef4b3686e4704f253cf37011c7f0362095cdfe
diff --git a/include/fstream b/include/fstream
index 1d2cb79..6b6e5b6 100644
--- a/include/fstream
+++ b/include/fstream
@@ -1745,7 +1745,12 @@
 _LIBCPP_POP_MACROS
 
 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+#  include <atomic>
 #  include <concepts>
+#  include <iosfwd>
+#  include <limits>
+#  include <new>
+#  include <stdexcept>
 #endif
 
 #endif // _LIBCPP_FSTREAM