#ifndef V8_BASE_TEMPLATE_META_PROGRAMMING_LIST_H_
#define V8_BASE_TEMPLATE_META_PROGRAMMING_LIST_H_
#include <type_traits>
namespace v8::base::tmp {
template <typename...>
struct list { … };
namespace detail {
template <typename List>
struct length_impl;
length_impl<list<Ts...>>;
template <typename List, int Index>
struct element_impl;
element_impl<list<Head, Tail...>, 0>;
element_impl<list<Head, Tail...>, Index>;
}
template <typename List>
struct length : detail::length_impl<List> { … };
length_v;
template <typename List, int Index>
struct element : detail::element_impl<List, Index> { … };
element_t;
}
#endif