C++0x: How can I access variadic tuple members by index at runtime?
- by nonoitall
I have written the following basic Tuple template:
template <typename... T>
class Tuple;
template <uintptr_t N, typename... T>
struct TupleIndexer;
template <typename Head, typename... Tail>
class Tuple<Head, Tail...> : public Tuple<Tail...> {
private:
Head element;
public:
template <uintptr_t…