Struct wrapping a check that verifies that no unused parameters are part of the arguments.
More...
#include <named_parameter_check.hpp>
Struct wrapping a check that verifies that no unused parameters are part of the arguments.
- Template Parameters
-
RequiredParametersTuple | All required kamping::internal::ParameterType passed as std::integral_constant in an std::tuple . |
OptionalParametersTuple | All optional kamping::internal::ParameterType passed as std::integral_constant in an std::tuple . |
Args | Arguments passed to the function that calls this check, i.e., the different parameters. |
◆ number_distinct_parameters()
template<size_t... Indices>
Get total number of different parameters (passed, required, and optional).
This check works similar to has_all_required_parameters. Here, we "iterate" over all parameters, i.e., RequiredParametersTuple
and OptionalParametersTuple
and check which parameters are not(!) passed as Args
. Then, we add this number to the size of Args. If this number is greater than the total number of (required and optional) parameters, there are unused parameters.
- Template Parameters
-
Indices | Index sequence used to unpack all required parameters in ParametersTuple . |
- Parameters
-
indices | The parameter is only required to deduce the template parameter. |
- Returns
- The number of different parameters (passed, optional, and required).
◆ assertion
Initial value:=
std::make_index_sequence<std::tuple_size_v<all_available_parameters>>{}
))
static constexpr auto number_distinct_parameters(std::index_sequence< Indices... > indices)
Get total number of different parameters (passed, required, and optional).
Definition named_parameter_check.hpp:310
true
if and only if no unused parameter can be found in Args
.
The documentation for this struct was generated from the following file: