mp/function_info: Add parameter_count_v

This commit is contained in:
MerryMage 2020-04-02 12:51:47 +01:00
parent aa225a7dc4
commit 28e5af20b5

View file

@ -58,6 +58,14 @@ struct FunctionInfo<R(C::*)(Args...) const> : public FunctionInfo<R(Args...)>
using class_type = C; using class_type = C;
}; };
/**
* Helper template for retrieving the number of function parameters.
*
* @tparam Function An arbitrary function type.
*/
template <typename Function>
constexpr size_t parameter_count_v = FunctionInfo<Function>::args_count;
/** /**
* Helper template for retrieving the type of a function parameter. * Helper template for retrieving the type of a function parameter.
* *