diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-20 11:32:41 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-20 11:32:41 +0100 |
| commit | 5c3e15f41e037d1b647124ba6374b68488c36a9b (patch) | |
| tree | a28c4c44e2ef42d9df1d2c39d5910ad2c5ef8637 | |
| parent | 59461af564af2b32a8ea21236ae2285d835d7c64 (diff) | |
| download | forstio-forstio-5c3e15f41e037d1b647124ba6374b68488c36a9b.tar.gz | |
added value group for templates
| -rw-r--r-- | modules/core/c++/templates.hpp | 11 |
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 */ |
