Overload resolution with std::function
In C++11… Let’s take a look at the specification of the constructor template of std::function (which takes any Callable): [func.wrap.func.con]/7-10 template<class F> function(F f); template <class F, class A> function(allocator_arg_t, const A& a, F f); 7 Requires: F shall be CopyConstructible. f shall be Callable (20.10.11.2) for argument types ArgTypes and return type R. The … Read more