[libcxx-commits] [PATCH] D120141: [libc++] Granularize chrono includes
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 23 12:21:48 PST 2022
Quuxplusone accepted this revision.
Quuxplusone added a comment.
This revision is now accepted and ready to land.
LGTM % the wording of the new release note.
================
Comment at: libcxx/docs/ReleaseNotes.rst:56-62
- Transitive includes of ``<algorithm>`` have been removed. If you see compiler errors
related to missing declarations inside namespace ``std`` when updating libc++,
you are probably missing ``#include <algorithm>`` in a file where you use algorithms.
+- Transitive includes of ``<chrono>`` have been removed. If you see compiler errors
+ related to missing declarations inside namespace ``std`` when updating libc++,
+ you are probably missing ``#include <chrono>`` in a file where you use the chrono library.
----------------
These two notes give conflicting advice. Solution: combine the notes! My recommendation:
```
- Some libc++ headers no longer transitively include all of ``<algorithm>``
and ``<chrono>``. If, after updating libc++, you see compiler errors related
to missing declarations in namespace ``std``, it might be because one of your
source files now needs to ``#include <algorithm>`` and/or ``#include <chrono>``.
```
(And then we should expand that same note as we remove more transitive includes.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120141/new/
https://reviews.llvm.org/D120141
More information about the libcxx-commits
mailing list