tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
tuple_element.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TUPLE_TUPLE_ELEMENT_HPP
4#define TETL_TUPLE_TUPLE_ELEMENT_HPP
5
10
11namespace etl {
12
13template <typename... Ts>
14struct tuple;
15
16template <size_t I, typename T>
17struct tuple_element;
18
19template <size_t I, typename T>
21
22template <size_t I, typename T>
23struct tuple_element<I, T const> {
24 using type = add_const_t<typename tuple_element<I, T>::type>;
25};
26
27template <size_t I, typename T>
28struct tuple_element<I, T volatile> {
29 using type = add_volatile_t<typename tuple_element<I, T>::type>;
30};
31
32template <size_t I, typename T>
33struct tuple_element<I, T const volatile> {
34 using type = add_cv_t<typename tuple_element<I, T>::type>;
35};
36
37} // namespace etl
38
39#endif // TETL_TUPLE_TUPLE_ELEMENT_HPP
Definition adjacent_find.hpp:8
typename tuple_element< I, T >::type tuple_element_t
Definition tuple_element.hpp:20
add_const_t< typename tuple_element< I, T >::type > type
Definition tuple_element.hpp:24
add_cv_t< typename tuple_element< I, T >::type > type
Definition tuple_element.hpp:34
add_volatile_t< typename tuple_element< I, T >::type > type
Definition tuple_element.hpp:29
Provides compile-time indexed access to the type of the elements of the array using tuple-like interf...
Definition array.hpp:267
Definition tuple.hpp:107