
#ifndef PLS_INTERNAL_HELPERS_SEQENCE_H_
#define PLS_INTERNAL_HELPERS_SEQENCE_H_

// See: https://stackoverflow.com/questions/7858817/unpacking-a-tuple-to-call-a-matching-function-pointer
// Would be easy in C++ 14 (has index sequences), but seems to be the only way to do it in C++ 11

namespace pls {
namespace internal {
namespace helpers {

template<int ...>
struct sequence {};

template<int N, int ...S>
struct sequence_gen : sequence_gen<N - 1, N - 1, S...> {};

template<int ...S>
struct sequence_gen<0, S...> {
  typedef sequence<S...> type;
};

}
}
}

#endif //PLS_INTERNAL_HELPERS_SEQENCE_H_
