mp/function_info: Add parameter_count_v
This commit is contained in:
parent
aa225a7dc4
commit
28e5af20b5
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue