aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-06-07 17:38:53 +0200
committerAdrian Kummerländer2014-06-07 17:38:53 +0200
commit49e2010b489ab6d5516a9abd896c67738e0dc1cc (patch)
treefd2cfaa693cb54765eb4e0f6598978aefc9e559f /src
parent5f6fc45749b99e9013f04c95a525f2d627db01bf (diff)
downloadInputXSLT-49e2010b489ab6d5516a9abd896c67738e0dc1cc.tar
InputXSLT-49e2010b489ab6d5516a9abd896c67738e0dc1cc.tar.gz
InputXSLT-49e2010b489ab6d5516a9abd896c67738e0dc1cc.tar.bz2
InputXSLT-49e2010b489ab6d5516a9abd896c67738e0dc1cc.tar.lz
InputXSLT-49e2010b489ab6d5516a9abd896c67738e0dc1cc.tar.xz
InputXSLT-49e2010b489ab6d5516a9abd896c67738e0dc1cc.tar.zst
InputXSLT-49e2010b489ab6d5516a9abd896c67738e0dc1cc.zip
Provided previously missing Sequence template implementation
* implemented for commit 5f6fc45 but not included into that commit
Diffstat (limited to 'src')
-rw-r--r--src/support/type/sequence.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/support/type/sequence.h b/src/support/type/sequence.h
new file mode 100644
index 0000000..a404e71
--- /dev/null
+++ b/src/support/type/sequence.h
@@ -0,0 +1,29 @@
+#ifndef INPUTXSLT_SRC_SUPPORT_TYPE_SEQUENCE_H_
+#define INPUTXSLT_SRC_SUPPORT_TYPE_SEQUENCE_H_
+
+#include <cstddef>
+#include <type_traits>
+
+namespace InputXSLT {
+
+template <std::size_t...>
+struct Sequence {
+ typedef Sequence type;
+};
+
+template <
+ std::size_t Size,
+ std::size_t Index = 0,
+ std::size_t... Current
+>
+struct IndexSequence {
+ typedef typename std::conditional<
+ Index < Size,
+ IndexSequence<Size, Index + 1, Current..., Index>,
+ Sequence<Current...>
+ >::type::type type;
+};
+
+}
+
+#endif // INPUTXSLT_SRC_SUPPORT_TYPE_SEQUENCE_H_