constexpr INVOKE and related utilities#703
constexpr INVOKE and related utilities#703StephanTLavavej merged 33 commits intomicrosoft:masterfrom
Conversation
|
Thanks for the feature! I've exhaustively reviewed the product code but haven't really looked at the test coverage yet; I'll take a look at the tests during the next iteration. |
Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>
Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>
Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>
Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>
Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>
Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>
|
BTW shouldn't |
|
I don't understand why some of the x86 tests are failing. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
The conditional noexcept on `_Invoker_ret::_Call` triggers VSO-1132186 "Weirdness with dependent template in noexcept-specifier".
Two conditional
Yes, that makes sense to me. |
|
I think it's ready for initial review |
StephanTLavavej
left a comment
There was a problem hiding this comment.
This looks good! My apologies for taking a month to get back to this. I found a couple of quiet hours to think hard about the changes, and everything appears to be in order. (Not easy to achieve, given the complexity of bind's machinery - I really appreciate your work here.) I'll push changes for some pre-existing/superficial syntactic things I noticed, and a bit more testing for conditionally noexcept bind(), and then I think this will be ready for final review and merge (to ship in VS 2019 16.8 Preview 1 if we can merge this week, otherwise Preview 2).
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
* Unwrapping a reference_wrapper is noexcept, but passing
the unwrapped reference to the callable object
might involve a possibly throwing conversion.
* Forwarding through a placeholder is noexcept, but passing
the unbound argument to the callable object
might involve a possibly throwing conversion.
* Nested bind() needs to sense whether the nested call might throw.
Mark PossiblyThrowingInt(int) as constexpr so we can construct
possibly_throwing_int during constant evaluation;
ref(possibly_throwing_int) is simpler than
declval<reference_wrapper<PossiblyThrowingInt>>().
|
Mini-changelog for more tests for conditionally
Mark |
StephanTLavavej
left a comment
There was a problem hiding this comment.
There seems to be a totally unrelated infrastructure issue with the arm/arm64 CI builds that we'll need to investigate, but I believe this PR is crystalline perfection. If a second reviewer can be equally convinced, I'll try to port this for Preview 1. 😺
CaseyCarter
left a comment
There was a problem hiding this comment.
One style comment, but I'm happy to merge this either way.
|
Thanks again for implementing this C++20 feature (over 3% of the remaining features, by paper count!). This will ship in VS 2019 16.8 Preview 1. 😺 😸 🎆 |
Resolves #51.
BTW without the checklist PRs feel so empty.