[libcxx-commits] [libcxx] [libc++] Remove <ostream> include from <chrono> (PR #96035)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 19 00:52:57 PDT 2024
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/96035
None
>From b646b926fc2259ea4b33f93a5c7ccfb3d9872d99 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 19 Jun 2024 09:52:29 +0200
Subject: [PATCH] [libc++] Remove <ostream> include from <chrono>
---
libcxx/include/__chrono/ostream.h | 2 +-
libcxx/include/chrono | 1 +
libcxx/test/libcxx/transitive_includes/cxx23.csv | 1 -
libcxx/test/libcxx/transitive_includes/cxx26.csv | 1 -
4 files changed, 2 insertions(+), 3 deletions(-)
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