Naios / function2

Improved and configurable drop-in replacement to std::function that supports move only types, multiple overloads and more
http://naios.github.io/function2
Boost Software License 1.0
539 stars 47 forks source link

Implement deduction guides #56

Open wak-google opened 1 year ago

wak-google commented 1 year ago

@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; })
Naios commented 1 year ago

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