[libcxx-commits] [libcxx] [libc++] Remove <ostream> include from <chrono> (PR #96035)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 20 08:48:49 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Nikolas Klauser (philnik777)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/96035.diff
4 Files Affected:
- (modified) libcxx/include/__chrono/ostream.h (+1-1)
- (modified) libcxx/include/chrono (+1)
- (modified) libcxx/test/libcxx/transitive_includes/cxx23.csv (-1)
- (modified) libcxx/test/libcxx/transitive_includes/cxx26.csv (-1)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/96035
More information about the libcxx-commits
mailing list