It is possible to deduce arity of a non-generic lambda by accessing its operator()
.
template
struct fInfo : fInfo
Another posible solution, for case when possible template types are known: http://coliru.stacked-crooked.com/a/e3a07d723a8f27e9
using T1 = string;
using T2 = int;
std::integral_constant static arity(function){ return {}; }
std::integral_constant static arity(function){ return {}; }
template
using Arity = decltype(arity(Fn{}));