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

Add option to limit empty callable propagation to known types #49

Closed mystor closed 2 years ago

mystor commented 2 years ago

This approach roughly matches the one used by std::function, explicitly enumerating the types which are supported for empty propagation.

Fixes #48

mystor commented 2 years ago

I unfortunately didn't end up running tests locally (cmake got upset when I asked it to run tests), so I expect that this will fail them.

mystor commented 2 years ago

Ping @Naios, does this approach seem reasonable? I think the build failures are also present without these changes.

Naios commented 2 years ago

Sorry for the delay. I think your changes look good and solve the problem elegantly. I dont think there is any possible solution otherwise (and if there is, it can be implemented in the future). Thank you for your contribution.