Details
- Reviewers
ldionne cjdb • Quuxplusone Mordante - Group Reviewers
Restricted Project - Commits
- rG120fa8293e22: [libc++][nfc] Move iterator_traits and related into __iterator/iterator_traits.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__iterator/iterator_traits.h | ||
---|---|---|
15 | Yes. Everything includes <type_traits>; that's kind of an invariant of libc++. #include <type_traits> // declval | |
libcxx/include/iterator | ||
416 | Include What You Use. If this file uses something out of <concepts>, it should include <concepts>, preferably with a comment. However, in this case, the inclusion is actually mandated by the Standard! so we should probably comment to that effect. #include <concepts> // mandated |
LGTM assuming fixing the CI only requires include fixes.
libcxx/include/__iterator/iterator_traits.h | ||
---|---|---|
15 | Fair point, but I disagree with the comment part. Unless it's a real surprise I dislike these comments since they tend to get outdated quickly. |
LGTM but:
- Sort includes
- Make sure you include-what-you-use
Agreed with @Mordante, only add a comment explaining why you add an #include when it's not obvious why the #include is needed, otherwise those comments become outdated too quickly to be useful.
libcxx/include/iterator | ||
---|---|---|
419–422 | Please sort those includes. |
Are we expecting <concepts> to include <type_traits>?