types/traits: add dedicated function argument counting trait
This commit is contained in:
parent
15fad39e8a
commit
923ba6b745
@ -257,6 +257,21 @@ struct func_traits : public ::detail::func_traits<
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <typename FunctionT>
|
||||
struct function_argument_count : public std::integral_constant<
|
||||
size_t,
|
||||
std::tuple_size_v<
|
||||
typename func_traits<FunctionT>::argument_types
|
||||
>
|
||||
> { };
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename FunctionT>
|
||||
constexpr auto function_argument_count_v = function_argument_count<FunctionT>::value;
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <std::size_t N, typename FuncT>
|
||||
|
Loading…
x
Reference in New Issue
Block a user