When using std::invoke in generic code, you can run into situations when the result type of the invocation is inconvenient.
The C++23 std::invoke_r allows the return type to be explicitly specified, avoiding cumbersome wrapping code.
Click to open in Compiler Explorer.
Leave a comment