[libcxx-commits] [PATCH] D99041: [libcxx] moves `std::invoke` into its own header
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 21 12:08:33 PDT 2021
Quuxplusone requested changes to this revision.
Quuxplusone added a subscriber: tcanens.
Quuxplusone added a comment.
This revision now requires changes to proceed.
- It's confusing to me that the header `__invoke` doesn't actually define `__invoke`, but rather `invoke`.
- Most libc++-internal consumers actually care about `__invoke`, not `invoke`. (`__invoke` is so fundamental that I would have expected it in `type_traits` with the rest of the fundamentals, but it looks like it's in `__functional_base` instead.)
- I suggest that you just move `invoke` into the existing `__functional_base` header, alongside `ref` et al. That'll be a much smaller patch, and also unifies `invoke` and `__invoke` in the same place, which is helpful to maintainers.
- I'd like your opinion (and maybe @tcanens too?) on whether libc++ could just use `_VSTD::__invoke` inside all the invocable concepts, instead of `_VSTD::invoke`. Using `__invoke` wouldn't help much AFAICT. It would //very slightly, negligibly// lessen the compile-time burden, and it would reduce the coupling between these concepts and the rest of the C++17 library. (This would merely help libc++ support a "C++14 plus concepts" mode, which is a crazy and pointless idea.) But I'm still wondering whether it would hurt.
- We should try to get to the point where no C++ standard header includes `<functional>`.
I might even get nerdsniped into making that patch...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99041/new/
https://reviews.llvm.org/D99041
More information about the libcxx-commits
mailing list