11 using decay_const_ref_t = std::remove_cv_t<std::remove_reference_t<T>>;
18 template <
typename T,
size_t I>
20 using type = std::tuple_size<std::array<T, I>>;
23 template <
typename... Ts>
25 using type = std::tuple_size<std::tuple<Ts...>>;
28 template <
typename T,
size_t I>
30 using type = std::integral_constant<size_t, I>;
37 constexpr
auto tuple_like_size_v = tuple_like_size_t<T>{};
41 template <
size_t I,
typename T>
42 constexpr
auto tuple_like_getter(T&& t) -> decltype(std::get<I>(t)) {
43 return std::get<I>(t);
46 template <
size_t I,
typename T,
size_t Ix>
47 constexpr
auto& tuple_like_getter(T (&x)[Ix]) {
48 static_assert(I < Ix,
"index out of range");
52 template <
size_t I,
typename T,
size_t Ix>
53 constexpr
const auto& tuple_like_getter(
const T (&x)[Ix]) {
54 static_assert(I < Ix,
"index out of range");
Definition: allocator.h:6
Definition: tuple_like.h:16