[libcxx-commits] [libcxx] 622d8b0 - [libc++] Remove <ostream> include from <chrono> (#96035)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 20 12:40:30 PDT 2024
Author: Nikolas Klauser
Date: 2024-06-20T21:40:23+02:00
New Revision: 622d8b0bc2dd8af7427a3e684c625ce5681aa4de
URL: https://github.com/llvm/llvm-project/commit/622d8b0bc2dd8af7427a3e684c625ce5681aa4de
DIFF: https://github.com/llvm/llvm-project/commit/622d8b0bc2dd8af7427a3e684c625ce5681aa4de.diff
LOG: [libc++] Remove <ostream> include from <chrono> (#96035)
Added:
Modified:
libcxx/include/__chrono/ostream.h
libcxx/include/chrono
libcxx/test/libcxx/transitive_includes/cxx23.csv
libcxx/test/libcxx/transitive_includes/cxx26.csv
Removed:
################################################################################
diff --git a/libcxx/include/__chrono/ostream.h b/libcxx/include/__chrono/ostream.h
index ecf07a320c8b9..bb0341bc3ec63 100644
--- a/libcxx/include/__chrono/ostream.h
+++ b/libcxx/include/__chrono/ostream.h
@@ -30,7 +30,7 @@
#include <__concepts/same_as.h>
#include <__config>
#include <__format/format_functions.h>
-#include <ostream>
+#include <__fwd/ostream.h>
#include <ratio>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index c1a92595ff1f5..c66771ffbad1a 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -997,6 +997,7 @@ constexpr chrono::year operator ""y(unsigned lo
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER == 20
# include <charconv>
# include <locale>
+# include <ostream>
#endif
#endif // _LIBCPP_CHRONO
diff --git a/libcxx/test/libcxx/transitive_includes/cxx23.csv b/libcxx/test/libcxx/transitive_includes/cxx23.csv
index bfb8b5def6224..4cad0fdf31bde 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx23.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx23.csv
@@ -75,7 +75,6 @@ chrono ctime
chrono format
chrono forward_list
chrono limits
-chrono ostream
chrono ratio
chrono sstream
chrono stdexcept
diff --git a/libcxx/test/libcxx/transitive_includes/cxx26.csv b/libcxx/test/libcxx/transitive_includes/cxx26.csv
index bfb8b5def6224..4cad0fdf31bde 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx26.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx26.csv
@@ -75,7 +75,6 @@ chrono ctime
chrono format
chrono forward_list
chrono limits
-chrono ostream
chrono ratio
chrono sstream
chrono stdexcept
More information about the libcxx-commits
mailing list