[libcxx-commits] [PATCH] D148405: [libc++] Remove the chrono include from algorithm
Ian Anderson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 15 13:30:27 PDT 2023
iana updated this revision to Diff 513936.
iana added a comment.
Remove algorithm -> chrono from the transitive include tests. Add a release note saying the include was removed and why.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148405/new/
https://reviews.llvm.org/D148405
Files:
libcxx/docs/ReleaseNotes.rst
libcxx/include/algorithm
libcxx/test/libcxx/transitive_includes/cxx03.csv
libcxx/test/libcxx/transitive_includes/cxx11.csv
libcxx/test/libcxx/transitive_includes/cxx14.csv
libcxx/test/libcxx/transitive_includes/cxx17.csv
Index: libcxx/test/libcxx/transitive_includes/cxx17.csv
===================================================================
--- libcxx/test/libcxx/transitive_includes/cxx17.csv
+++ libcxx/test/libcxx/transitive_includes/cxx17.csv
@@ -1,6 +1,5 @@
algorithm atomic
algorithm bit
-algorithm chrono
algorithm climits
algorithm concepts
algorithm cstddef
Index: libcxx/test/libcxx/transitive_includes/cxx14.csv
===================================================================
--- libcxx/test/libcxx/transitive_includes/cxx14.csv
+++ libcxx/test/libcxx/transitive_includes/cxx14.csv
@@ -1,6 +1,5 @@
algorithm atomic
algorithm bit
-algorithm chrono
algorithm climits
algorithm concepts
algorithm cstddef
Index: libcxx/test/libcxx/transitive_includes/cxx11.csv
===================================================================
--- libcxx/test/libcxx/transitive_includes/cxx11.csv
+++ libcxx/test/libcxx/transitive_includes/cxx11.csv
@@ -1,6 +1,5 @@
algorithm atomic
algorithm bit
-algorithm chrono
algorithm climits
algorithm concepts
algorithm cstddef
Index: libcxx/test/libcxx/transitive_includes/cxx03.csv
===================================================================
--- libcxx/test/libcxx/transitive_includes/cxx03.csv
+++ libcxx/test/libcxx/transitive_includes/cxx03.csv
@@ -1,6 +1,5 @@
algorithm atomic
algorithm bit
-algorithm chrono
algorithm climits
algorithm concepts
algorithm cstddef
Index: libcxx/include/algorithm
===================================================================
--- libcxx/include/algorithm
+++ libcxx/include/algorithm
@@ -1921,10 +1921,6 @@
# include <__pstl_algorithm>
#endif
-#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
-# include <chrono>
-#endif
-
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
# include <bit>
Index: libcxx/docs/ReleaseNotes.rst
===================================================================
--- libcxx/docs/ReleaseNotes.rst
+++ libcxx/docs/ReleaseNotes.rst
@@ -66,6 +66,9 @@
- C++2b: ``atomic``, ``bit``, ``cstdint``, ``cstdlib``, ``cstring``, ``initializer_list``, ``limits``, ``new``,
``stdexcept``, ``system_error``, ``type_traits``, ``typeinfo``
+- ``<algorithm>`` no longer includes ``<chrono>`` in any C++ version (it was prevously included in C++17 and earlier).
+ This was necessary to break include cycles, which are not allowed with clang modules.
+
- The headers ``<experimental/algorithm>`` and ``<experimental/functional>`` have been removed, since all the contents
have been implemented in namespace ``std`` for at least two releases.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148405.513936.patch
Type: text/x-patch
Size: 2648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230415/9a891ac9/attachment.bin>
More information about the libcxx-commits
mailing list