C++ Library Extensions 2022.12.09
To help learn modern C++ programming
dynamic_array< ElementType > Class Template Reference

Public Types

using iterator = ElementType *
 
using const_iterator = const ElementType *
 
using iterator = ElementType *
 
using const_iterator = const ElementType *
 
using iterator = ElementType *
 
using const_iterator = const ElementType *
 

Public Member Functions

size_t size () const
 
void resize (size_t count)
 
 dynamic_array (size_t size=1)
 
 dynamic_array (const dynamic_array &right_hand_side)
 
ElementType * operator& ()
 
ElementType & operator[] (size_t index)
 
const ElementType & operator[] (size_t index) const
 
ElementType & at (size_t index)
 
const ElementType & at (size_t index) const
 
dynamic_arrayoperator= (const dynamic_array &right_hand_side)
 
 dynamic_array (dynamic_array &&right_hand_side) noexcept
 
dynamic_arrayoperator= (dynamic_array &&right_hand_side) noexcept
 
 ~dynamic_array ()
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin ()
 
const_iterator cend ()
 
auto rbegin ()
 
auto rend ()
 
auto crbegin ()
 
auto crend ()
 
size_t size () const
 
void resize (size_t count)
 
 dynamic_array (size_t size=1)
 
 dynamic_array (const dynamic_array &right_hand_side)
 
ElementType * operator& ()
 
ElementType & operator[] (size_t index)
 
const ElementType & operator[] (size_t index) const
 
ElementType & at (size_t index)
 
const ElementType & at (size_t index) const
 
dynamic_arrayoperator= (const dynamic_array &right_hand_side)
 
 dynamic_array (dynamic_array &&right_hand_side) noexcept
 
dynamic_arrayoperator= (dynamic_array &&right_hand_side) noexcept
 
 ~dynamic_array ()
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin ()
 
const_iterator cend ()
 
auto rbegin ()
 
auto rend ()
 
auto crbegin ()
 
auto crend ()
 
size_t size () const
 
void resize (size_t count)
 
 dynamic_array (size_t size=1)
 
 dynamic_array (const dynamic_array &right_hand_side)
 
ElementType * operator& ()
 
ElementType & operator[] (size_t index)
 
const ElementType & operator[] (size_t index) const
 
ElementType & at (size_t index)
 
const ElementType & at (size_t index) const
 
dynamic_arrayoperator= (const dynamic_array &right_hand_side)
 
 dynamic_array (dynamic_array &&right_hand_side) noexcept
 
dynamic_arrayoperator= (dynamic_array &&right_hand_side) noexcept
 
 ~dynamic_array ()
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin ()
 
const_iterator cend ()
 
auto rbegin ()
 
auto rend ()
 
auto crbegin ()
 
auto crend ()
 
size_t size () const
 
void resize (size_t count)
 
 dynamic_array (size_t size=1)
 
 dynamic_array (const dynamic_array &right_hand_side)
 
ElementType * operator& ()
 
ElementType & operator[] (size_t index)
 
const ElementType & operator[] (size_t index) const
 
ElementType & at (size_t index)
 
const ElementType & at (size_t index) const
 
dynamic_arrayoperator= (const dynamic_array &right_hand_side)
 
 dynamic_array (dynamic_array &&right_hand_side) noexcept
 
dynamic_arrayoperator= (dynamic_array &&right_hand_side) noexcept
 
 ~dynamic_array ()
 

Friends

std::ostream & operator<< (std::ostream &os, const dynamic_array &da)
 
std::ostream & operator<< (std::ostream &os, const dynamic_array &da)
 
std::ostream & operator<< (std::ostream &os, const dynamic_array &da)
 
std::ostream & operator<< (std::ostream &os, const dynamic_array &da)
 

Detailed Description

template<typename ElementType>
class dynamic_array< ElementType >

Definition at line 8 of file 021-emplace.cpp.

Member Typedef Documentation

◆ const_iterator [1/3]

template<typename ElementType >
using dynamic_array< ElementType >::const_iterator = const ElementType*

Definition at line 18 of file 022-iterators.cpp.

◆ const_iterator [2/3]

template<typename ElementType >
using dynamic_array< ElementType >::const_iterator = const ElementType*

Definition at line 18 of file 023-invariant.cpp.

◆ const_iterator [3/3]

template<typename ElementType >
using dynamic_array< ElementType >::const_iterator = const ElementType*

Definition at line 20 of file 024-dynamic_array.cpp.

◆ iterator [1/3]

template<typename ElementType >
using dynamic_array< ElementType >::iterator = ElementType*

Definition at line 12 of file 022-iterators.cpp.

◆ iterator [2/3]

template<typename ElementType >
using dynamic_array< ElementType >::iterator = ElementType*

Definition at line 12 of file 023-invariant.cpp.

◆ iterator [3/3]

template<typename ElementType >
using dynamic_array< ElementType >::iterator = ElementType*

Definition at line 14 of file 024-dynamic_array.cpp.

Constructor & Destructor Documentation

◆ dynamic_array() [1/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( size_t  size = 1)
inline

Definition at line 59 of file 021-emplace.cpp.

Here is the call graph for this function:

◆ dynamic_array() [2/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( const dynamic_array< ElementType > &  right_hand_side)
inline

Definition at line 77 of file 021-emplace.cpp.

◆ dynamic_array() [3/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( dynamic_array< ElementType > &&  right_hand_side)
inlinenoexcept

Definition at line 167 of file 021-emplace.cpp.

◆ ~dynamic_array() [1/4]

template<typename ElementType >
dynamic_array< ElementType >::~dynamic_array ( )
inline

Definition at line 199 of file 021-emplace.cpp.

◆ dynamic_array() [4/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( size_t  size = 1)
inlineexplicit

Definition at line 118 of file 022-iterators.cpp.

Here is the call graph for this function:

◆ dynamic_array() [5/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( const dynamic_array< ElementType > &  right_hand_side)
inline

Definition at line 136 of file 022-iterators.cpp.

◆ dynamic_array() [6/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( dynamic_array< ElementType > &&  right_hand_side)
inlinenoexcept

Definition at line 226 of file 022-iterators.cpp.

◆ ~dynamic_array() [2/4]

template<typename ElementType >
dynamic_array< ElementType >::~dynamic_array ( )
inline

Definition at line 258 of file 022-iterators.cpp.

◆ dynamic_array() [7/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( size_t  size = 1)
inlineexplicit

Definition at line 117 of file 023-invariant.cpp.

Here is the call graph for this function:

◆ dynamic_array() [8/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( const dynamic_array< ElementType > &  right_hand_side)
inline

Definition at line 135 of file 023-invariant.cpp.

◆ dynamic_array() [9/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( dynamic_array< ElementType > &&  right_hand_side)
inlinenoexcept

Definition at line 220 of file 023-invariant.cpp.

◆ ~dynamic_array() [3/4]

template<typename ElementType >
dynamic_array< ElementType >::~dynamic_array ( )
inline

Definition at line 252 of file 023-invariant.cpp.

◆ dynamic_array() [10/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( size_t  size = 1)
inlineexplicit

Definition at line 156 of file 024-dynamic_array.cpp.

◆ dynamic_array() [11/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( const dynamic_array< ElementType > &  right_hand_side)
inline

Definition at line 164 of file 024-dynamic_array.cpp.

◆ dynamic_array() [12/12]

template<typename ElementType >
dynamic_array< ElementType >::dynamic_array ( dynamic_array< ElementType > &&  right_hand_side)
inlinenoexcept

Definition at line 226 of file 024-dynamic_array.cpp.

◆ ~dynamic_array() [4/4]

template<typename ElementType >
dynamic_array< ElementType >::~dynamic_array ( )
inline

Definition at line 254 of file 024-dynamic_array.cpp.

Member Function Documentation

◆ at() [1/8]

template<typename ElementType >
ElementType & dynamic_array< ElementType >::at ( size_t  index)
inline

Definition at line 103 of file 021-emplace.cpp.

◆ at() [2/8]

template<typename ElementType >
ElementType & dynamic_array< ElementType >::at ( size_t  index)
inline

Definition at line 162 of file 022-iterators.cpp.

◆ at() [3/8]

template<typename ElementType >
ElementType & dynamic_array< ElementType >::at ( size_t  index)
inline

Definition at line 159 of file 023-invariant.cpp.

◆ at() [4/8]

template<typename ElementType >
ElementType & dynamic_array< ElementType >::at ( size_t  index)
inline

Definition at line 177 of file 024-dynamic_array.cpp.

◆ at() [5/8]

template<typename ElementType >
const ElementType & dynamic_array< ElementType >::at ( size_t  index) const
inline

Definition at line 111 of file 021-emplace.cpp.

◆ at() [6/8]

template<typename ElementType >
const ElementType & dynamic_array< ElementType >::at ( size_t  index) const
inline

Definition at line 170 of file 022-iterators.cpp.

◆ at() [7/8]

template<typename ElementType >
const ElementType & dynamic_array< ElementType >::at ( size_t  index) const
inline

Definition at line 167 of file 023-invariant.cpp.

◆ at() [8/8]

template<typename ElementType >
const ElementType & dynamic_array< ElementType >::at ( size_t  index) const
inline

Definition at line 185 of file 024-dynamic_array.cpp.

◆ begin() [1/3]

template<typename ElementType >
iterator dynamic_array< ElementType >::begin ( )
inline

Definition at line 43 of file 022-iterators.cpp.

Here is the caller graph for this function:

◆ begin() [2/3]

template<typename ElementType >
iterator dynamic_array< ElementType >::begin ( )
inline

Definition at line 43 of file 023-invariant.cpp.

◆ begin() [3/3]

template<typename ElementType >
iterator dynamic_array< ElementType >::begin ( )
inline

Definition at line 90 of file 024-dynamic_array.cpp.

◆ cbegin() [1/3]

template<typename ElementType >
const_iterator dynamic_array< ElementType >::cbegin ( )
inline

Definition at line 56 of file 022-iterators.cpp.

Here is the caller graph for this function:

◆ cbegin() [2/3]

template<typename ElementType >
const_iterator dynamic_array< ElementType >::cbegin ( )
inline

Definition at line 56 of file 023-invariant.cpp.

◆ cbegin() [3/3]

template<typename ElementType >
const_iterator dynamic_array< ElementType >::cbegin ( )
inline

Definition at line 101 of file 024-dynamic_array.cpp.

◆ cend() [1/3]

template<typename ElementType >
const_iterator dynamic_array< ElementType >::cend ( )
inline

Definition at line 63 of file 022-iterators.cpp.

Here is the caller graph for this function:

◆ cend() [2/3]

template<typename ElementType >
const_iterator dynamic_array< ElementType >::cend ( )
inline

Definition at line 63 of file 023-invariant.cpp.

◆ cend() [3/3]

template<typename ElementType >
const_iterator dynamic_array< ElementType >::cend ( )
inline

Definition at line 108 of file 024-dynamic_array.cpp.

◆ crbegin() [1/3]

template<typename ElementType >
auto dynamic_array< ElementType >::crbegin ( )
inline

Definition at line 80 of file 022-iterators.cpp.

Here is the call graph for this function:

◆ crbegin() [2/3]

template<typename ElementType >
auto dynamic_array< ElementType >::crbegin ( )
inline

Definition at line 80 of file 023-invariant.cpp.

Here is the call graph for this function:

◆ crbegin() [3/3]

template<typename ElementType >
auto dynamic_array< ElementType >::crbegin ( )
inline

Definition at line 125 of file 024-dynamic_array.cpp.

Here is the call graph for this function:

◆ crend() [1/3]

template<typename ElementType >
auto dynamic_array< ElementType >::crend ( )
inline

Definition at line 85 of file 022-iterators.cpp.

Here is the call graph for this function:

◆ crend() [2/3]

template<typename ElementType >
auto dynamic_array< ElementType >::crend ( )
inline

Definition at line 85 of file 023-invariant.cpp.

Here is the call graph for this function:

◆ crend() [3/3]

template<typename ElementType >
auto dynamic_array< ElementType >::crend ( )
inline

Definition at line 130 of file 024-dynamic_array.cpp.

Here is the call graph for this function:

◆ end() [1/3]

template<typename ElementType >
iterator dynamic_array< ElementType >::end ( )
inline

Definition at line 50 of file 022-iterators.cpp.

Here is the caller graph for this function:

◆ end() [2/3]

template<typename ElementType >
iterator dynamic_array< ElementType >::end ( )
inline

Definition at line 50 of file 023-invariant.cpp.

◆ end() [3/3]

template<typename ElementType >
iterator dynamic_array< ElementType >::end ( )
inline

Definition at line 96 of file 024-dynamic_array.cpp.

◆ operator&() [1/4]

template<typename ElementType >
ElementType * dynamic_array< ElementType >::operator& ( )
inline

Definition at line 97 of file 021-emplace.cpp.

◆ operator&() [2/4]

template<typename ElementType >
ElementType * dynamic_array< ElementType >::operator& ( )
inline

Definition at line 156 of file 022-iterators.cpp.

◆ operator&() [3/4]

template<typename ElementType >
ElementType * dynamic_array< ElementType >::operator& ( )
inline

Definition at line 153 of file 023-invariant.cpp.

◆ operator&() [4/4]

template<typename ElementType >
ElementType * dynamic_array< ElementType >::operator& ( )
inline

Definition at line 171 of file 024-dynamic_array.cpp.

◆ operator=() [1/8]

template<typename ElementType >
dynamic_array & dynamic_array< ElementType >::operator= ( const dynamic_array< ElementType > &  right_hand_side)
inline

Definition at line 121 of file 021-emplace.cpp.

◆ operator=() [2/8]

template<typename ElementType >
dynamic_array & dynamic_array< ElementType >::operator= ( const dynamic_array< ElementType > &  right_hand_side)
inline

Definition at line 180 of file 022-iterators.cpp.

◆ operator=() [3/8]

template<typename ElementType >
dynamic_array & dynamic_array< ElementType >::operator= ( const dynamic_array< ElementType > &  right_hand_side)
inline

Definition at line 177 of file 023-invariant.cpp.

◆ operator=() [4/8]

template<typename ElementType >
dynamic_array & dynamic_array< ElementType >::operator= ( const dynamic_array< ElementType > &  right_hand_side)
inline

Definition at line 195 of file 024-dynamic_array.cpp.

◆ operator=() [5/8]

template<typename ElementType >
dynamic_array & dynamic_array< ElementType >::operator= ( dynamic_array< ElementType > &&  right_hand_side)
inlinenoexcept

Definition at line 179 of file 021-emplace.cpp.

◆ operator=() [6/8]

template<typename ElementType >
dynamic_array & dynamic_array< ElementType >::operator= ( dynamic_array< ElementType > &&  right_hand_side)
inlinenoexcept

Definition at line 238 of file 022-iterators.cpp.

◆ operator=() [7/8]

template<typename ElementType >
dynamic_array & dynamic_array< ElementType >::operator= ( dynamic_array< ElementType > &&  right_hand_side)
inlinenoexcept

Definition at line 232 of file 023-invariant.cpp.

◆ operator=() [8/8]

template<typename ElementType >
dynamic_array & dynamic_array< ElementType >::operator= ( dynamic_array< ElementType > &&  right_hand_side)
inlinenoexcept

Definition at line 236 of file 024-dynamic_array.cpp.

◆ operator[]() [1/8]

template<typename ElementType >
ElementType & dynamic_array< ElementType >::operator[] ( size_t  index)
inline

Definition at line 99 of file 021-emplace.cpp.

◆ operator[]() [2/8]

template<typename ElementType >
ElementType & dynamic_array< ElementType >::operator[] ( size_t  index)
inline

Definition at line 158 of file 022-iterators.cpp.

◆ operator[]() [3/8]

template<typename ElementType >
ElementType & dynamic_array< ElementType >::operator[] ( size_t  index)
inline

Definition at line 155 of file 023-invariant.cpp.

◆ operator[]() [4/8]

template<typename ElementType >
ElementType & dynamic_array< ElementType >::operator[] ( size_t  index)
inline

Definition at line 173 of file 024-dynamic_array.cpp.

◆ operator[]() [5/8]

template<typename ElementType >
const ElementType & dynamic_array< ElementType >::operator[] ( size_t  index) const
inline

Definition at line 101 of file 021-emplace.cpp.

◆ operator[]() [6/8]

template<typename ElementType >
const ElementType & dynamic_array< ElementType >::operator[] ( size_t  index) const
inline

Definition at line 160 of file 022-iterators.cpp.

◆ operator[]() [7/8]

template<typename ElementType >
const ElementType & dynamic_array< ElementType >::operator[] ( size_t  index) const
inline

Definition at line 157 of file 023-invariant.cpp.

◆ operator[]() [8/8]

template<typename ElementType >
const ElementType & dynamic_array< ElementType >::operator[] ( size_t  index) const
inline

Definition at line 175 of file 024-dynamic_array.cpp.

◆ rbegin() [1/3]

template<typename ElementType >
auto dynamic_array< ElementType >::rbegin ( )
inline

Definition at line 70 of file 022-iterators.cpp.

Here is the call graph for this function:

◆ rbegin() [2/3]

template<typename ElementType >
auto dynamic_array< ElementType >::rbegin ( )
inline

Definition at line 70 of file 023-invariant.cpp.

Here is the call graph for this function:

◆ rbegin() [3/3]

template<typename ElementType >
auto dynamic_array< ElementType >::rbegin ( )
inline

Definition at line 115 of file 024-dynamic_array.cpp.

Here is the call graph for this function:

◆ rend() [1/3]

template<typename ElementType >
auto dynamic_array< ElementType >::rend ( )
inline

Definition at line 75 of file 022-iterators.cpp.

Here is the call graph for this function:

◆ rend() [2/3]

template<typename ElementType >
auto dynamic_array< ElementType >::rend ( )
inline

Definition at line 75 of file 023-invariant.cpp.

Here is the call graph for this function:

◆ rend() [3/3]

template<typename ElementType >
auto dynamic_array< ElementType >::rend ( )
inline

Definition at line 120 of file 024-dynamic_array.cpp.

Here is the call graph for this function:

◆ resize() [1/4]

template<typename ElementType >
void dynamic_array< ElementType >::resize ( size_t  count)
inline

Definition at line 33 of file 021-emplace.cpp.

◆ resize() [2/4]

template<typename ElementType >
void dynamic_array< ElementType >::resize ( size_t  count)
inline

Definition at line 92 of file 022-iterators.cpp.

◆ resize() [3/4]

template<typename ElementType >
void dynamic_array< ElementType >::resize ( size_t  count)
inline

Definition at line 93 of file 023-invariant.cpp.

◆ resize() [4/4]

template<typename ElementType >
void dynamic_array< ElementType >::resize ( size_t  count)
inline

Definition at line 138 of file 024-dynamic_array.cpp.

◆ size() [1/4]

template<typename ElementType >
size_t dynamic_array< ElementType >::size ( ) const
inline

Definition at line 31 of file 021-emplace.cpp.

Here is the caller graph for this function:

◆ size() [2/4]

template<typename ElementType >
size_t dynamic_array< ElementType >::size ( ) const
inline

Definition at line 90 of file 022-iterators.cpp.

◆ size() [3/4]

template<typename ElementType >
size_t dynamic_array< ElementType >::size ( ) const
inline

Definition at line 90 of file 023-invariant.cpp.

◆ size() [4/4]

template<typename ElementType >
size_t dynamic_array< ElementType >::size ( ) const
inline

Definition at line 135 of file 024-dynamic_array.cpp.

Friends And Related Function Documentation

◆ operator<< [1/4]

template<typename ElementType >
std::ostream & operator<< ( std::ostream &  os,
const dynamic_array< ElementType > &  da 
)
friend

Definition at line 206 of file 021-emplace.cpp.

◆ operator<< [2/4]

template<typename ElementType >
std::ostream & operator<< ( std::ostream &  os,
const dynamic_array< ElementType > &  da 
)
friend

Definition at line 265 of file 022-iterators.cpp.

◆ operator<< [3/4]

template<typename ElementType >
std::ostream & operator<< ( std::ostream &  os,
const dynamic_array< ElementType > &  da 
)
friend

Definition at line 259 of file 023-invariant.cpp.

◆ operator<< [4/4]

template<typename ElementType >
std::ostream & operator<< ( std::ostream &  os,
const dynamic_array< ElementType > &  da 
)
friend

Definition at line 259 of file 024-dynamic_array.cpp.


The documentation for this class was generated from the following files: