ccia_code_samples
ccia_code_samples copied to clipboard
`std::result_of` deprecation
Suggestion
See here for reasons why std::invoke_result_t
is to be used over std::result_of<>::type
.
Code also amended functionally to make the template variadic (whitespace and naming amendments preferential and optional).
At the very least, lines 3 and 6 need to be amended to include typename
in order to compile.
Line 3
std::future<std::result_of<F(A&&)>::type>
std::future<typename std::result_of<F(A&&)>::type>
Line 6
typedef std::result_of<F(A&&)>::type result_type;
typedef typename std::result_of<F(A&&)>::type result_type;
Tested in Xcode 14.3