From 4f7dc81492dbc10c7b74b1e0084e65d9d94b748e Mon Sep 17 00:00:00 2001 From: Mat M Date: Fri, 25 Nov 2016 17:09:45 -0500 Subject: [PATCH] mp: Fix static_assert condition (#46) Not an issue currently, but this would have prevented type inspection on the last function parameter. --- src/common/mp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/mp.h b/src/common/mp.h index cdf1b147..66870080 100644 --- a/src/common/mp.h +++ b/src/common/mp.h @@ -30,7 +30,7 @@ struct FunctionInfo template 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>; }; };