std::tuple_element<std::array> - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::tuple_element<std::array>

From cppreference.com
< cpp‎ | container‎ | array

Defined in header `<array>` |  |
template< std::size_t I, class T, std::size_t N > struct tuple_element<I, array<T, N> >; |  | (since C++11)

Provides compile-time indexed access to the type of the elements of the array using tuple-like interface

### [edit] Member types

Member type | Definition
type | the type of elements of the array

### [edit] Possible implementation

    template<std::size_t I, class T>
      struct tuple_element;

    template<std::size_t I, class T, std::size_t N>
      struct tuple_element<I, std::array<T,N> >
      {
         using type = T;
      };

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

tuple_element | obtains the type of the specified element (class template specialization) [edit]
std::tuple_element<std::pair> (C++11) | obtains the type of the elements of `pair` (class template specialization) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/container/array/tuple_element&oldid=82801"
Category:

- Todo no example