Created
May 3, 2013 16:35
-
-
Save jbandela/5510834 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from http://stackoverflow.com/questions/12707030/sequence-range-unroll-using-variadic-templates | |
template<unsigned...> struct indices{}; | |
template<unsigned N, unsigned... Indices> | |
struct indices_gen : indices_gen<N-1, N-1, Indices...>{}; | |
template<unsigned... Indices> | |
struct indices_gen<1, Indices...>{ | |
typedef indices<0, Indices...> type; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment