From 0f8074fdee33e830e8a7f7b3ad12971f7d9ecdf7 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 5 Aug 2023 18:17:15 +0200 Subject: c++,core: Fixed compile time multiplication naming --- c++/core/templates.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'c++/core/templates.h') diff --git a/c++/core/templates.h b/c++/core/templates.h index a3a5f7a..e704f37 100644 --- a/c++/core/templates.h +++ b/c++/core/templates.h @@ -70,7 +70,23 @@ template struct parameter_key_pack_type { static constexpr string_literal literal = parameter_key_pack_type_helper::literal; - static_assert(i < sizeof...(Keys), "Provided index is too large in list"); + static_assert(i < sizeof...(Keys), "Provided index is too large for list"); +}; + +template +struct parameter_pack_value_helper { + static constexpr T value = parameter_pack_value_helper::value; +}; + +template +struct parameter_pack_value_helper { + static constexpr T value = V0; +}; + +template +struct parameter_pack_value { + static constexpr T value = parameter_pack_value_helper::value; + static_assert(i < sizeof...(Values), "Provided index is too large for list"); }; template @@ -83,7 +99,7 @@ struct ct_multiply { template struct ct_multiply { - static constexpr T value = V0 * templ_multiply::value; + static constexpr T value = V0 * ct_multiply::value; }; } -- cgit v1.2.3