summaryrefslogtreecommitdiff
path: root/index_list.hpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2014-04-18 18:30:52 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2014-04-18 18:30:52 +0200
commitd834eba65c2c65c1540d13c9c39ced51bd87cf83 (patch)
tree68c0533b668545cbfb0b0d556ac7ebf9bf8d3e97 /index_list.hpp
parent0969e7a24c0ae2a0cc9c5bd4be0d18c29bfe7f30 (diff)
downloadgeneric-gui-d834eba65c2c65c1540d13c9c39ced51bd87cf83.tar.gz
generic-gui-d834eba65c2c65c1540d13c9c39ced51bd87cf83.tar.bz2
generic-gui-d834eba65c2c65c1540d13c9c39ced51bd87cf83.zip
First working prototype
Diffstat (limited to 'index_list.hpp')
-rw-r--r--index_list.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/index_list.hpp b/index_list.hpp
new file mode 100644
index 0000000..f363dc3
--- /dev/null
+++ b/index_list.hpp
@@ -0,0 +1,16 @@
+#pragma once
+
+template<int... Indices>
+struct indices {
+ typedef indices<Indices..., sizeof...(Indices)> next;
+};
+
+template<int N>
+struct build_indices {
+ typedef typename build_indices<N - 1>::type::next type;
+};
+
+template<>
+struct build_indices<0> {
+ typedef indices<> type;
+};