From 535498274de9aec26b7baad3df6a9720e9370ede Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Wed, 9 Oct 2024 17:43:08 +0200 Subject: Dangling changes for language things --- modules/core/c++/reduce_templates.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'modules/core/c++') diff --git a/modules/core/c++/reduce_templates.hpp b/modules/core/c++/reduce_templates.hpp index ef5fa4c..fb643df 100644 --- a/modules/core/c++/reduce_templates.hpp +++ b/modules/core/c++/reduce_templates.hpp @@ -13,23 +13,28 @@ struct tmpl_group_reduce_match { template struct tmpl_group_reduce_match> { + /** + * Check if type already exists in list + */ static constexpr bool has_type = std::is_same_v or tmpl_group_reduce_match>::has_type; using type = typename std::conditional, tmpl_group>::type; }; +/** + * Reducing in outer loop + */ template struct tmpl_group_reduce { using reduced_type = T; }; -/** - * Reducing in outer loop - */ template struct tmpl_group_reduce> { + // Compile Time outer iteration using reduced_inner_list = typename tmpl_group_reduce>::reduced_type; + // Actual reduction. Basically an inner loop call using reduced_type = typename tmpl_group_reduce_match::type; }; } -- cgit v1.2.3