Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

...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 for Clang, but not MSVC due to a guaranteed copy elision bug VSO-1026729.

...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.
@CaseyCarter CaseyCarter added the bug Something isn't working label Sep 9, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner September 9, 2020 19:38
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll push a change to fix the duplicated test lines, which look like a copy-paste relic.

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for salvaging my work! This looks good and your naming is better.

Copy link
Contributor

@mnatsuhara mnatsuhara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😵

@StephanTLavavej StephanTLavavej merged commit 7a9998c into microsoft:master Sep 23, 2020
@StephanTLavavej
Copy link
Member

Thanks again for fixing this arcane machinery! 🔮

@CaseyCarter CaseyCarter deleted the invocable_r branch September 23, 2020 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants