summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/c++/templates.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/core/c++/templates.hpp b/modules/core/c++/templates.hpp
index 921fabb..7b0b297 100644
--- a/modules/core/c++/templates.hpp
+++ b/modules/core/c++/templates.hpp
@@ -14,6 +14,12 @@ struct tmpl_group {
static constexpr uint64_t size = sizeof...(T);
};
+template<typename T, T... values>
+struct tmpl_value_group {
+ static constexpr string_literal name = "tmpl_value_group";
+ static constexpr uint64_t size = sizeof...(values);
+};
+
/**
* Concats two tmpl_group into one
*/
@@ -25,6 +31,11 @@ struct tmpl_concat<tmpl_group<T...>, tmpl_group<U...>> {
using type = tmpl_group<T..., U...>;
};
+template<typename T, T... L, T... R>
+struct tmpl_concat<T,tmpl_value_group<T,L...>,tmpl_value_group<T,R...>> {
+ using type = tmpl_value_group<T,L...,R...>;
+};
+
/**
* Returns the position of the parameter type in the parameter pack
*/