mp: Fix static_assert condition (#46)

Not an issue currently, but this would have prevented type inspection on
the last function parameter.
This commit is contained in:
Mat M 2016-11-25 17:09:45 -05:00 committed by Merry
parent 700561a69a
commit 4f7dc81492

View file

@ -30,7 +30,7 @@ struct FunctionInfo<R(Args...)>
template <size_t ParameterIndex> template <size_t ParameterIndex>
struct Parameter struct Parameter
{ {
static_assert(args_count != 0 && ParameterIndex < args_count - 1, "Non-existent function parameter index"); static_assert(args_count != 0 && ParameterIndex < args_count, "Non-existent function parameter index");
using type = std::tuple_element_t<ParameterIndex, std::tuple<Args...>>; using type = std::tuple_element_t<ParameterIndex, std::tuple<Args...>>;
}; };
}; };