[libcxx-commits] [PATCH] D104980: [libcxx][NFC] replaces `<utility>` includes with specific headers
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jul 3 06:25:46 PDT 2021
Mordante added a comment.
Nice cleanup!
================
Comment at: libcxx/include/__functional/greater.h:52-55
+ _NOEXCEPT_(noexcept(static_cast<_T1&&>(__t) > static_cast<_T2&&>(__u)))
+ -> decltype (static_cast<_T1&&>(__t) > static_cast<_T2&&>(__u))
+ { return static_cast<_T1&&>(__t) > static_cast<_T2&&>(__u); }
typedef void is_transparent;
----------------
cjdb wrote:
> ldionne wrote:
> > What's the rationale for making this change here? Why not include `__utility/forward.h`?
> Oh, did this slip through? I was experimenting with something and then abandoned it. Will fix.
I noticed the same change at other places too.
================
Comment at: libcxx/include/__split_buffer:6
#include <__config>
+#include <__utility/move.h>
#include <__utility/forward.h>
----------------
Please sort the headers.
================
Comment at: libcxx/include/algorithm:655
#include <initializer_list>
-#include <utility> // needed to provide swap_ranges.
#include <memory>
#include <iterator>
----------------
Can you remove the duplicated includes and sort them. Not part of your change, but would be nice to do it along in this patch,
================
Comment at: libcxx/include/mutex:200
#endif
+#include <type_traits> // __invoke
#include <version>
----------------
D104942 landed `__functional/invoke.h`, can you use that? If not please update the comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104980/new/
https://reviews.llvm.org/D104980
More information about the libcxx-commits
mailing list