Tatooine
ith_type.h
Go to the documentation of this file.
1#ifndef TATOOINE_VARIADIC_HELPERS_ITH_TYPE_H
2#define TATOOINE_VARIADIC_HELPERS_ITH_TYPE_H
3//==============================================================================
4namespace tatooine::variadic {
5//==============================================================================
6template <std::size_t I, typename CurType, typename... RestTypes>
8 using type = typename ith_type_impl<I - 1, RestTypes...>::type;
9};
10template <typename CurType, typename... RestTypes>
11struct ith_type_impl<0, CurType, RestTypes...> {
12 using type = CurType;
13};
14template <std::size_t I, typename... Types>
15using ith_type = typename ith_type_impl<I, Types...>::type;
16//==============================================================================
17} // namespace tatooine::variadic
18 //==============================================================================
19#endif
Definition: variadic_helpers.h:9
typename ith_type_impl< I, Types... >::type ith_type
Definition: ith_type.h:15
Definition: ith_type.h:7
typename ith_type_impl< I - 1, RestTypes... >::type type
Definition: ith_type.h:8