-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account for C++17 deferred temporary materialization in invocable_r #1282
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.
There was a problem hiding this 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
There was a problem hiding this 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.
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😵
Thanks again for fixing this arcane machinery! 🔮 |
...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.