From 28e5af20b535d2051098596420bc41e0075aeb23 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Thu, 2 Apr 2020 12:51:47 +0100 Subject: [PATCH] mp/function_info: Add parameter_count_v --- src/common/mp/function_info.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/mp/function_info.h b/src/common/mp/function_info.h index 99aebadc..8f8bae14 100644 --- a/src/common/mp/function_info.h +++ b/src/common/mp/function_info.h @@ -58,6 +58,14 @@ struct FunctionInfo : public FunctionInfo using class_type = C; }; +/** + * Helper template for retrieving the number of function parameters. + * + * @tparam Function An arbitrary function type. + */ +template +constexpr size_t parameter_count_v = FunctionInfo::args_count; + /** * Helper template for retrieving the type of a function parameter. *