diff options
author | Adrian Kummerländer | 2014-06-07 17:38:53 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-06-07 17:38:53 +0200 |
commit | 49e2010b489ab6d5516a9abd896c67738e0dc1cc (patch) | |
tree | fd2cfaa693cb54765eb4e0f6598978aefc9e559f /src/support/type | |
parent | 5f6fc45749b99e9013f04c95a525f2d627db01bf (diff) | |
download | InputXSLT-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/support/type')
-rw-r--r-- | src/support/type/sequence.h | 29 |
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_ |