LTOList
|
#include <LTOList.hpp>
Classes | |
class | const_iterator |
class | iterator |
Public Types | |
using | value_type = T |
using | size_type = size_t |
using | difference_type = ptrdiff_t |
using | reference = T & |
using | const_reference = const T & |
using | pointer = T * |
using | const_pointer = const T * |
Public Member Functions | |
LTOList (LTOList &&other) | |
LTOList (const LTOList &other) | |
LTOList (std::initializer_list< T > init) | |
iterator | begin () |
iterator | end () |
iterator | rbegin () |
iterator | rend () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | rbegin () const |
const_iterator | rend () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
const_iterator | crbegin () const |
const_iterator | crend () const |
size_type | size () const |
bool | empty () const |
reference | at (size_type i) |
const_reference | at (size_type i) const |
reference | operator[] (size_type i) |
const_reference | operator[] (size_type i) const |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
iterator | insert (size_type side, iterator position, const_reference val) |
iterator | insert (size_type side, iterator position, T &&val) |
template<class... Args> | |
iterator | emplace (size_type side, iterator position, Args... args) |
iterator | insert (iterator position, const_reference val) |
iterator | insert (iterator position, T &&val) |
template<class... Args> | |
iterator | emplace (iterator position, Args... args) |
void | insert (size_type side, iterator position, size_type n, const_reference val) |
template<class... Args> | |
void | emplace (size_type side, iterator position, size_type n, Args... args) |
void | insert (iterator position, size_type n, const_reference val) |
template<class... Args> | |
void | emplace (iterator position, size_type n, Args... args) |
template<class InputIterator > | |
void | insert (size_type side, iterator position, InputIterator elem_begin, InputIterator elem_end) |
template<class InputIterator > | |
void | insert (iterator position, InputIterator elem_begin, InputIterator elem_end) |
iterator | erase (iterator position) |
iterator | erase (const_iterator position) |
iterator | erase (iterator elem_begin, iterator elem_end) |
iterator | erase (const_iterator elem_begin, const_iterator elem_end) |
template<class InputIterator > | |
void | assign (InputIterator elem_begin, InputIterator elem_end) |
void | assign (size_type n, const T &val) |
void | push_front (const T &val) |
void | push_front (T &&val) |
template<class... Args> | |
void | emplace_front (Args... args) |
void | push_back (const T &val) |
void | push_back (T &&val) |
template<class... Args> | |
void | emplace_back (Args... args) |
void | pop_front () |
void | pop_back () |
void | clear () |
void | swap (LTOList< T > &other) |
using LTOList< T >::const_pointer = const T * |
The type of a constant-pointer for elements that the LTOList can store.
using LTOList< T >::const_reference = const T & |
The type of a constant-reference for elements that the LTOList can store.
using LTOList< T >::difference_type = ptrdiff_t |
The integer type that represents the difference of two indices in LTOList.
The type of a pointer for elements that the LTOList can store.
The type of a reference for elements that the LTOList can store.
The integer type that represents the number of elements in LTOList.
using LTOList< T >::value_type = T |
The type of elements that the LTOList can store.
|
inline |
Same as emplace(size_type side, iterator position, Args... args) with side = 0
.
|
inline |
Same as emplace(size_type side, iterator position, size_type n, Args... args) with side = 0
.
|
inline |
Inserts an element to this LTOList, before or after the specified element.
side | If it is 0, the new element is stored before position . Otherwise it is stored after position . |
position | The iterator at which the new element is stored. |
args | The new element. It considers args as the arguments of the constructor of LTOList::value_type, and the constructed element is inserted into LTOList. |
|
inline |
Inserts specified number of elements to this LTOList, before or after the specified element.
side | If it is 0, the new element is stored before position . Otherwise it is stored after position . If position is end(), side must be 0; otherwise an exception std::invalid_argument is raised. |
position | The iterator at which the new element is stored. |
n | The number of insertions. |
args | The new element. It considers args as the arguments of the constructor of LTOList::value_type, and the constructed element is inserted into LTOList. |
|
inline |
Same as insert(size_type side, iterator position, const_reference val) with side = 0
.
|
inline |
Same as insert(size_type side, iterator position, InputIterator elem_begin, InputIterator elem_end) with side = 0
.
|
inline |
Same as insert(size_type side, iterator position, size_type n, const_reference val) with side = 0
.
Same as insert(size_type side, iterator position, T && val) with side = 0
.
|
inline |
Inserts an element to this LTOList, before or after the specified element.
side | If it is 0, the new element is stored before position . Otherwise it is stored after position . If position is end(), side must be 0; otherwise an exception std::invalid_argument is raised. |
position | The iterator at which the new element is stored. |
val | The new element. It is copied to be stored into LTOList. |
|
inline |
Inserts a bunch of elements to this LTOList, before or after the specified element.
side | If it is 0, the new element is stored before position . Otherwise it is stored after position . If position is end(), side must be 0; otherwise an exception std::invalid_argument is raised. |
position | The iterator at which the new element is stored. |
elem_begin | The iterator (any iterator that points LTOList::value_type is accepted; not limited to LTOList::iterator) for the first element to be inserted. |
elem_end | The iterator (any iterator that points LTOList::value_type is accepted; not limited to LTOList::iterator) before the last element to be inserted. |
|
inline |
Inserts specified number of elements to this LTOList, before or after the specified element.
side | If it is 0, the new element is stored before position . Otherwise it is stored after position . If position is end(), side must be 0; otherwise an exception std::invalid_argument is raised. |
position | The iterator at which the new element is stored. |
n | The number of insertions. |
val | The new element. It is copied to be stored into LTOList. |
|
inline |
Inserts an element to this LTOList, before or after the specified element.
side | If it is 0, the new element is stored before position . Otherwise it is stored after position . If position is end(), side must be 0; otherwise an exception std::invalid_argument is raised. |
position | The iterator at which the new element is stored. |
val | The new element. It is "moved" to be stored into LTOList (i.e., the value in val may be deleted). |