summaryrefslogtreecommitdiff
path: root/modules/core/c++
diff options
context:
space:
mode:
authorClaudius 'keldu' Holeksa <mail@keldu.de>2024-10-21 17:52:46 +0200
committerClaudius 'keldu' Holeksa <mail@keldu.de>2024-10-21 17:52:46 +0200
commitf2a1a3f56768d9aa03796808206f067daa5e0aa0 (patch)
treedfda93c68047a36c89e2a7af2000337c18e5558b /modules/core/c++
parent545abfe5eb973c83ee38a799add02605c05af26d (diff)
Working towards proper rpc reference example
Diffstat (limited to 'modules/core/c++')
-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;