libstdc++: std::array< _Tp, _Nm > Struct Template Reference

libstdc++

std::array< _Tp, _Nm > Struct Template Reference
Containers » Sequences

`#include <array>`

## Public Types
typedef const value_type * | const_iterator
typedef const value_type * | const_pointer
typedef const value_type & | const_reference
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator
typedef std::ptrdiff_t | difference_type
typedef value_type * | iterator
typedef value_type * | pointer
typedef value_type & | reference
typedef std::reverse_iterator< iterator > | reverse_iterator
typedef std::size_t | size_type
typedef _Tp | value_type

## Public Member Functions
constexpr reference | at (size_type __n)
constexpr const_reference | at (size_type __n) const
constexpr const_reference | back () const noexcept
constexpr reference | back () noexcept
constexpr const_iterator | begin () const noexcept
constexpr iterator | begin () noexcept
constexpr const_iterator | cbegin () const noexcept
constexpr const_iterator | cend () const noexcept
constexpr const_reverse_iterator | crbegin () const noexcept
constexpr const_reverse_iterator | crend () const noexcept
constexpr const_pointer | data () const noexcept
constexpr pointer | data () noexcept
constexpr bool | empty () const noexcept
constexpr const_iterator | end () const noexcept
constexpr iterator | end () noexcept
constexpr void | fill (const value_type &__u)
constexpr const_reference | front () const noexcept
constexpr reference | front () noexcept
constexpr size_type | max_size () const noexcept
constexpr const_reference | operator[] (size_type __n) const noexcept
constexpr reference | operator[] (size_type __n) noexcept
constexpr const_reverse_iterator | rbegin () const noexcept
constexpr reverse_iterator | rbegin () noexcept
constexpr const_reverse_iterator | rend () const noexcept
constexpr reverse_iterator | rend () noexcept
constexpr size_type | size () const noexcept
constexpr void | swap (array &__other) noexcept(__array_traits< _Tp, _Nm >::_Is_nothrow_swappable::value)

## Public Attributes
__array_traits< _Tp, _Nm >::_Type | _M_elems

## Detailed Description

template<typename _Tp, std::size_t _Nm>
struct std::array< _Tp, _Nm >

A standard container for storing a fixed size sequence of elements.

Meets the requirements of a container, a reversible container, and a sequence.

Sets support random access iterators.

Template Parameters

  Tp | Type of element. Required to be a complete type.
  Nm | Number of elements.

Definition at line 102 of file array.

## Member Typedef Documentation

## ◆ const_iterator

template<typename _Tp, std::size_t _Nm>

typedef const value_type* std::array< _Tp, _Nm >::const_iterator

Definition at line 110 of file array.

## ◆ const_pointer

template<typename _Tp, std::size_t _Nm>

typedef const value_type* std::array< _Tp, _Nm >::const_pointer

Definition at line 106 of file array.

## ◆ const_reference

template<typename _Tp, std::size_t _Nm>

typedef const value_type& std::array< _Tp, _Nm >::const_reference

Definition at line 108 of file array.

## ◆ const_reverse_iterator

template<typename _Tp, std::size_t _Nm>

typedef std::reverse_iterator<const_iterator> std::array< _Tp, _Nm >::const_reverse_iterator

Definition at line 114 of file array.

## ◆ difference_type

template<typename _Tp, std::size_t _Nm>

typedef std::ptrdiff_t std::array< _Tp, _Nm >::difference_type

Definition at line 112 of file array.

## ◆ iterator

template<typename _Tp, std::size_t _Nm>

typedef value_type* std::array< _Tp, _Nm >::iterator

Definition at line 109 of file array.

## ◆ pointer

template<typename _Tp, std::size_t _Nm>

typedef value_type* std::array< _Tp, _Nm >::pointer

Definition at line 105 of file array.

## ◆ reference

template<typename _Tp, std::size_t _Nm>

typedef value_type& std::array< _Tp, _Nm >::reference

Definition at line 107 of file array.

## ◆ reverse_iterator

template<typename _Tp, std::size_t _Nm>

typedef std::reverse_iterator<iterator> std::array< _Tp, _Nm >::reverse_iterator

Definition at line 113 of file array.

## ◆ size_type

template<typename _Tp, std::size_t _Nm>

typedef std::size_t std::array< _Tp, _Nm >::size_type

Definition at line 111 of file array.

## ◆ value_type

template<typename _Tp, std::size_t _Nm>

typedef _Tp std::array< _Tp, _Nm >::value_type

Definition at line 104 of file array.

## Member Function Documentation

## ◆ at() [1/2]

template<typename _Tp, std::size_t _Nm>

reference std::array< _Tp, _Nm >::at | ( | size_type | __n | ) |
| inlineconstexpr

Definition at line 225 of file array.

## ◆ at() [2/2]

template<typename _Tp, std::size_t _Nm>

const_reference std::array< _Tp, _Nm >::at | ( | size_type | __n | ) | const
| inlineconstexpr

Definition at line 235 of file array.

## ◆ back() [1/2]

template<typename _Tp, std::size_t _Nm>

const_reference std::array< _Tp, _Nm >::back | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 274 of file array.

## ◆ back() [2/2]

template<typename _Tp, std::size_t _Nm>

reference std::array< _Tp, _Nm >::back | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 266 of file array.

## ◆ begin() [1/2]

template<typename _Tp, std::size_t _Nm>

const_iterator std::array< _Tp, _Nm >::begin | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 139 of file array.

## ◆ begin() [2/2]

template<typename _Tp, std::size_t _Nm>

iterator std::array< _Tp, _Nm >::begin | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 134 of file array.

## ◆ cbegin()

template<typename _Tp, std::size_t _Nm>

const_iterator std::array< _Tp, _Nm >::cbegin | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 174 of file array.

## ◆ cend()

template<typename _Tp, std::size_t _Nm>

const_iterator std::array< _Tp, _Nm >::cend | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 179 of file array.

## ◆ crbegin()

template<typename _Tp, std::size_t _Nm>

const_reverse_iterator std::array< _Tp, _Nm >::crbegin | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 184 of file array.

## ◆ crend()

template<typename _Tp, std::size_t _Nm>

const_reverse_iterator std::array< _Tp, _Nm >::crend | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 189 of file array.

## ◆ data() [1/2]

template<typename _Tp, std::size_t _Nm>

const_pointer std::array< _Tp, _Nm >::data | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 289 of file array.

## ◆ data() [2/2]

template<typename _Tp, std::size_t _Nm>

pointer std::array< _Tp, _Nm >::data | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 284 of file array.

## ◆ empty()

template<typename _Tp, std::size_t _Nm>

bool std::array< _Tp, _Nm >::empty | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 203 of file array.

## ◆ end() [1/2]

template<typename _Tp, std::size_t _Nm>

const_iterator std::array< _Tp, _Nm >::end | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 149 of file array.

## ◆ end() [2/2]

template<typename _Tp, std::size_t _Nm>

iterator std::array< _Tp, _Nm >::end | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 144 of file array.

## ◆ fill()

template<typename _Tp, std::size_t _Nm>

void std::array< _Tp, _Nm >::fill | ( | const value_type & | __u | ) |
| inlineconstexpr

Definition at line 123 of file array.

## ◆ front() [1/2]

template<typename _Tp, std::size_t _Nm>

const_reference std::array< _Tp, _Nm >::front | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 256 of file array.

## ◆ front() [2/2]

template<typename _Tp, std::size_t _Nm>

reference std::array< _Tp, _Nm >::front | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 248 of file array.

## ◆ max_size()

template<typename _Tp, std::size_t _Nm>

size_type std::array< _Tp, _Nm >::max_size | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 199 of file array.

## ◆ operator[]() [1/2]

template<typename _Tp, std::size_t _Nm>

const_reference std::array< _Tp, _Nm >::operator[] | ( | size_type | __n | ) | const
| inlineconstexprnoexcept

Definition at line 216 of file array.

## ◆ operator[]() [2/2]

template<typename _Tp, std::size_t _Nm>

reference std::array< _Tp, _Nm >::operator[] | ( | size_type | __n | ) |
| inlineconstexprnoexcept

Definition at line 208 of file array.

## ◆ rbegin() [1/2]

template<typename _Tp, std::size_t _Nm>

const_reverse_iterator std::array< _Tp, _Nm >::rbegin | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 159 of file array.

## ◆ rbegin() [2/2]

template<typename _Tp, std::size_t _Nm>

reverse_iterator std::array< _Tp, _Nm >::rbegin | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 154 of file array.

## ◆ rend() [1/2]

template<typename _Tp, std::size_t _Nm>

const_reverse_iterator std::array< _Tp, _Nm >::rend | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 169 of file array.

## ◆ rend() [2/2]

template<typename _Tp, std::size_t _Nm>

reverse_iterator std::array< _Tp, _Nm >::rend | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 164 of file array.

## ◆ size()

template<typename _Tp, std::size_t _Nm>

size_type std::array< _Tp, _Nm >::size | ( |  | ) | const
| inlineconstexprnoexcept

Definition at line 195 of file array.

## ◆ swap()

template<typename _Tp, std::size_t _Nm>

void std::array< _Tp, _Nm >::swap | ( | array< _Tp, _Nm > & | __other | ) |
| inlineconstexprnoexcept

Definition at line 127 of file array.

## Member Data Documentation

## ◆ _M_elems

template<typename _Tp, std::size_t _Nm>

__array_traits<_Tp,_Nm>::_Type std::array< _Tp, _Nm >::_M_elems

Definition at line 117 of file array.

The documentation for this struct was generated from the following file:

- array