Re: [PATCH] PR libstdc++/91456 make INVOKE work with uncopyable prvalues

2019-08-15 Thread Jonathan Wakely
On 15/08/19 17:04 +0100, Jonathan Wakely wrote: In C++17 a function can return a prvalue of a type that cannot be moved or copied. The current implementation of std::is_invocable_r uses std::is_convertible to test the conversion to R required by INVOKE. That fails for non-copyable prvalues, becau

[PATCH] PR libstdc++/91456 make INVOKE work with uncopyable prvalues

2019-08-15 Thread Jonathan Wakely
In C++17 a function can return a prvalue of a type that cannot be moved or copied. The current implementation of std::is_invocable_r uses std::is_convertible to test the conversion to R required by INVOKE. That fails for non-copyable prvalues, because std::is_convertible is defined in terms of std