function2 icon indicating copy to clipboard operation
function2 copied to clipboard

Implement deduction guides

Open wak-google opened this issue 3 years ago • 1 comments

@Naios

It would be nice if function_base supported deduction guides similar to std::function so that lambdas can have sensible type erased deductions.

https://en.cppreference.com/w/cpp/utility/functional/function/deduction_guides


Commit Hash

2d3a878ef19dd5d2fb188898513610fac0a48621

Expected Behavior

This should compile

fu2::unique_function([](int &i) { return i + 5; })

wak-google avatar Dec 03 '22 03:12 wak-google

The idea is awesome, I would highly appreciate a pullrequest for this feature.

Naios avatar Dec 05 '22 08:12 Naios