alternative Standard Libary  0.29.8
std::array< T, N > Template-Klassenreferenz

#include <array.hpp>

+ Klassendiagramm für std::array< T, N >:

Öffentliche Typen

using iterator = T *
 
using const_iterator = const T *
 
using reference = T &
 
using const_reference = const T &
 
using size_type = size_t
 

Öffentliche Methoden

 array ()
 
 array (const T a[N])
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
size_type size ()
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
template<typename T2 >
array< T, N > & operator= (const array< T2, N > &rhs)
 
void assign (const T &value)
 
void fill (const T &value)
 
iterator data ()
 
const_iterator data ()
 
template<typename E = char, class TAllocator = std::allocator, typename TStorage = std::simple_string_storage<E, TAllocator>>
std::basic_string< E, TAllocator, TStorage > to_string ()
 

Ausführliche Beschreibung

template<typename T, size_t N>
class std::array< T, N >

Dokumentation der benutzerdefinierten Datentypen

◆ const_iterator

template<typename T, size_t N>
using std::array< T, N >::const_iterator = const T*

◆ const_reference

template<typename T, size_t N>
using std::array< T, N >::const_reference = const T&

◆ iterator

template<typename T, size_t N>
using std::array< T, N >::iterator = T*

◆ reference

template<typename T, size_t N>
using std::array< T, N >::reference = T&

◆ size_type

template<typename T, size_t N>
using std::array< T, N >::size_type = size_t

Beschreibung der Konstruktoren und Destruktoren

◆ array() [1/2]

template<typename T, size_t N>
std::array< T, N >::array ( )
inline
50 { }

◆ array() [2/2]

template<typename T, size_t N>
std::array< T, N >::array ( const T  a[N])
inline
51 { std::copy_n(&a[0], N, m_data); }
void copy_n(const T *first, size_t n, T *result)
Definition: algorithm.hpp:35

Dokumentation der Elementfunktionen

◆ assign()

template<typename T, size_t N>
void std::array< T, N >::assign ( const T &  value)
inline
82 { fill ( value ); }
void fill(const T &value)
Definition: array.hpp:83

◆ back() [1/2]

template<typename T, size_t N>
reference std::array< T, N >::back ( )
inline
63 { return m_buffer[N-1]; }

◆ back() [2/2]

template<typename T, size_t N>
const_reference std::array< T, N >::back ( ) const
inline
64 { return m_buffer[N-1]; }

◆ begin() [1/2]

template<typename T, size_t N>
iterator std::array< T, N >::begin ( )
inline
53 { return m_buffer; }

◆ begin() [2/2]

template<typename T, size_t N>
const_iterator std::array< T, N >::begin ( ) const
inline
54 { return m_buffer; }

◆ cbegin()

template<typename T, size_t N>
const_iterator std::array< T, N >::cbegin ( ) const
inline
55 { return m_buffer; }

◆ cend()

template<typename T, size_t N>
const_iterator std::array< T, N >::cend ( ) const
inline
59 { return m_buffer[N-1]; }

◆ data() [1/2]

template<typename T, size_t N>
iterator std::array< T, N >::data ( )
inline
86 { return &m_buffer[0]; }

◆ data() [2/2]

template<typename T, size_t N>
const_iterator std::array< T, N >::data ( )
inline
87 { return &m_buffer[0]; }

◆ end() [1/2]

template<typename T, size_t N>
iterator std::array< T, N >::end ( )
inline
57 { return m_buffer[N-1]; }

◆ end() [2/2]

template<typename T, size_t N>
const_iterator std::array< T, N >::end ( ) const
inline
58 { return m_buffer[N-1]; }

◆ fill()

template<typename T, size_t N>
void std::array< T, N >::fill ( const T &  value)
inline
83 { std::fill_n<T>(begin(), size(), value); }
size_type size()
Definition: array.hpp:66
iterator begin()
Definition: array.hpp:53

◆ front() [1/2]

template<typename T, size_t N>
reference std::array< T, N >::front ( )
inline
61 { return m_buffer[0]; }

◆ front() [2/2]

template<typename T, size_t N>
const_reference std::array< T, N >::front ( ) const
inline
62 { return m_buffer[0]; }

◆ operator=()

template<typename T, size_t N>
template<typename T2 >
array<T,N>& std::array< T, N >::operator= ( const array< T2, N > &  rhs)
inline
76  {
77 
78  std::copy(rhs.begin(),rhs.end(), begin());
79  return *this;
80  }
iterator begin()
Definition: array.hpp:53
void copy(const T *first, const T *last, T *result)
Definition: algorithm.hpp:39

◆ operator[]() [1/2]

template<typename T, size_t N>
reference std::array< T, N >::operator[] ( size_type  i)
inline
71 { assert(i < size()); return m_buffer[i]; }
size_type size()
Definition: array.hpp:66

◆ operator[]() [2/2]

template<typename T, size_t N>
const_reference std::array< T, N >::operator[] ( size_type  i) const
inline
72 { assert(i < size()); return m_buffer[i]; }
size_type size()
Definition: array.hpp:66

◆ size()

template<typename T, size_t N>
size_type std::array< T, N >::size ( )
inline
66 { return N; }

◆ to_string()

template<typename T, size_t N>
template<typename E = char, class TAllocator = std::allocator, typename TStorage = std::simple_string_storage<E, TAllocator>>
std::basic_string<E, TAllocator, TStorage> std::array< T, N >::to_string ( )
inline
91  {
92  return std::frmstring<E, TAllocator, TStorage>("ByteBuffer [%i]", size() ); }
size_type size()
Definition: array.hpp:66

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: