From e664537536de989b6d013a8cb6bc0eb2b1fbe0fb Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 31 Jul 2023 18:57:09 +0200 Subject: c++,core: Added multiplication helper to template handling --- c++/core/templates.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'c++/core/templates.h') diff --git a/c++/core/templates.h b/c++/core/templates.h index 39befc1..a3a5f7a 100644 --- a/c++/core/templates.h +++ b/c++/core/templates.h @@ -73,4 +73,17 @@ struct parameter_key_pack_type { static_assert(i < sizeof...(Keys), "Provided index is too large in list"); }; +template +struct ct_multiply; + +template +struct ct_multiply { + static constexpr T value = 1; +}; + +template +struct ct_multiply { + static constexpr T value = V0 * templ_multiply::value; +}; + } -- cgit v1.2.3