Account for C++17 deferred temporary materialization in invocable_r#1282
Merged
StephanTLavavej merged 7 commits intomicrosoft:masterfrom Sep 23, 2020
Merged
Account for C++17 deferred temporary materialization in invocable_r#1282StephanTLavavej merged 7 commits intomicrosoft:masterfrom
StephanTLavavej merged 7 commits intomicrosoft:masterfrom
Conversation
...and `is_invocable_r_v`, as required to be able to initialize `std::function<non_movable_type(args...)>` (see DevCom-676429). This fixes DevCom-676429 with Clang, but not MSVC due to a guaranteed copy elision bug VSO-1026729.
StephanTLavavej
requested changes
Sep 18, 2020
StephanTLavavej
requested changes
Sep 18, 2020
Member
StephanTLavavej
left a comment
There was a problem hiding this comment.
There are ~100 test configs failing; examples:
1: C:\a\1\s\tests\std\tests\Dev11_0535636_functional_overhaul\test.cpp(1647): error C2440: 'initializing': cannot convert from 'test_function::<lambda_8>' to 'std::function<void (std::string &,std::unique_ptr<std::string,std::default_delete<std::string>> &&,std::unique_ptr<int,std::default_delete<int>>)>'
1: C:\a\1\s\tests\std\tests\Dev11_0535636_functional_overhaul\test.cpp(1647): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1: C:\a\1\s\tests\std\tests\VSO_0105317_expression_sfinae\test.cpp(31): error C2338: is_invocable_r_v<void, Callable, Args...>
1: C:\a\1\s\tests\std\tests\VSO_0105317_expression_sfinae\test.cpp(38): note: see reference to class template instantiation 'HasInvokeResultT<void,Callable,int>' being compiled
1: with
1: [
1: Callable=FP
1: ]
1: C:\a\1\s\tests\std\tests\VSO_0105317_expression_sfinae\test.cpp(54): note: see reference to class template instantiation 'HasResultOfT<FP (int)>' being compiled
Member
StephanTLavavej
left a comment
There was a problem hiding this comment.
I'll push a change to fix the duplicated test lines, which look like a copy-paste relic.
StephanTLavavej
approved these changes
Sep 21, 2020
CaseyCarter
commented
Sep 21, 2020
CaseyCarter
commented
Sep 21, 2020
StephanTLavavej
approved these changes
Sep 21, 2020
Member
StephanTLavavej
left a comment
There was a problem hiding this comment.
Thanks for salvaging my work! This looks good and your naming is better.
mnatsuhara
approved these changes
Sep 22, 2020
Member
|
Thanks again for fixing this arcane machinery! 🔮 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
...and
is_invocable_r_v, as required to be able to initializestd::function<non_movable_type(args...)>(see DevCom-676429). Thisfixes DevCom-676429 for Clang, but not MSVC due to a guaranteed copy elision bug VSO-1026729.