[libcxx-commits] [PATCH] D99041: [libcxx] moves `std::invoke` into `__functional_base`
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 21 15:53:38 PDT 2021
cjdb added a subscriber: CaseyCarter.
cjdb added a comment.
In D99041#2640407 <https://reviews.llvm.org/D99041#2640407>, @zoecarver wrote:
> In D99041#2640306 <https://reviews.llvm.org/D99041#2640306>, @cjdb wrote:
>> In D99041#2640282 <https://reviews.llvm.org/D99041#2640282>, @Quuxplusone wrote:
>>> - 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.
>> Considered this, but chickened out because a change to `invoke` might not reflect updates to `invocable` without manual intervention. I'd prefer to keep concepts verbatim, even though I strongly suspect any changes to `invoke` will likely go through //`INVOKE`// Also note that @ldionne has strong opinions on keeping things as close to wording as possible.
> If there are updates to invocable, then I assume we'd add new tests to reflect the change. Either the tests would pass, in which case we could keep using `__invoke` or they wouldn't and we'd update it then. Also, `std::invoke` is a one-liner that just calls `__invoke`, so I think we're OK.
My concern isn't changes to `invocable`; it's changes to `invoke` that aren't done through `__invoke`, and so we're blind to the changes. @CaseyCarter, @tcanens any input here on my paranoia?
> That being said, I don't really see what we're getting from this change. Is it just that `<concepts>` would stop relying on `<functional>` (which very well might be worth it)?
Yeah, that's the salient point here.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits