summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/c++/templates.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/core/c++/templates.hpp b/modules/core/c++/templates.hpp
index fc9d368..921fabb 100644
--- a/modules/core/c++/templates.hpp
+++ b/modules/core/c++/templates.hpp
@@ -11,6 +11,7 @@ namespace saw {
template <class... T>
struct tmpl_group {
static constexpr string_literal name = "tmpl_group";
+ static constexpr uint64_t size = sizeof...(T);
};
/**
@@ -112,6 +113,14 @@ struct parameter_pack_value {
static_assert(i < sizeof...(Values), "Provided index is too large for list");
};
+template<uint64_t I, typename T>
+struct tmpl_group_pack_type;
+
+template<uint64_t I, typename... T>
+struct tmpl_group_pack_type<I, tmpl_group<T...>> {
+ using type = typename parameter_pack_type<I, T...>::type;
+};
+
template<typename T, T... V>
struct ct_multiply;