48#include <lal/detail/type_traits/first_true.hpp>
61template <std::size_t ith_idx,
typename... Ts>
64 template <std::size_t cur_idx,
typename t1,
typename... ts>
76 template <std::
size_t cur_
idx,
typename t1>
79 using type = std::conditional_t<ith_idx == cur_idx, t1, std::nullptr_t>;
87template <std::size_t ith_idx,
typename... Ts>
90static_assert(std::is_same_v<ith_type_t<0, int, float, double>,
int>);
91static_assert(std::is_same_v<ith_type_t<1, int, float, double>,
float>);
92static_assert(std::is_same_v<ith_type_t<2, int, float, double>,
double>);
93static_assert(std::is_same_v<ith_type_t<3, int, float, double>, std::nullptr_t>);
94static_assert(std::is_same_v<ith_type_t<4, int, float, double>, std::nullptr_t>);
95static_assert(std::is_same_v<ith_type_t<5, int, float, double>, std::nullptr_t>);
typename ith_type< ith_idx, Ts... >::type ith_type_t
Shorthand for ith_type::type.
Definition ith_type.hpp:88
Main namespace of the library.
Definition basic_types.hpp:48
std::conditional_t< ith_idx==cur_idx, t1, std::nullptr_t > type
Type at position ith_idx of Ts.
Definition ith_type.hpp:79
Implementation of ith_type.
Definition ith_type.hpp:65
std::conditional_t< ith_idx==cur_idx, t1, typename _ith_type_impl< cur_idx+1, ts... >::type > type
Type at position ith_idx of Ts.
Definition ith_type.hpp:67
Selection of the ith type of a list of types.
Definition ith_type.hpp:62
typename _ith_type_impl< 0, Ts... >::type type
The type at the i-th position in Ts.
Definition ith_type.hpp:83