Loading...
Searching...
No Matches
cxx::List< D, Alloc > Class Template Reference

Doubly linked list, with internal allocation. More...

`#include <list>`

Collaboration diagram for cxx::List< D, Alloc >:

## Data Structures

class | Iter
| Iterator. More...

## Public Member Functions

void | push_back (D const &d) noexcept
| Add element at the end of the list.
void | push_front (D const &d) noexcept
| Add element at the beginning of the list.
void | remove (Iter const &i) noexcept
| Remove element pointed to by the iterator.
unsigned long | size () const noexcept
| Get the length of the list.
D const & | operator[] (unsigned long idx) const noexcept
| Random access.
D & | operator[] (unsigned long idx) noexcept
| Random access.
Iter | items () noexcept
| Get iterator for the list elements.

## Detailed Description

template<typename D, template< typename A > class Alloc = New_allocator>
class cxx::List< D, Alloc >

Doubly linked list, with internal allocation.

Container for items of type D, implemented by a doubly linked list. Alloc defines the allocator policy.

Definition at line 323 of file list.

## Member Function Documentation

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

template<typename D, template< typename A > class Alloc = New_allocator>

D const & cxx::List< D, Alloc >::operator[] | ( | unsigned long | idx | ) | const

inlinenoexcept

Random access.

Complexity is O(n).

Definition at line 393 of file list.

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

template<typename D, template< typename A > class Alloc = New_allocator>

D & cxx::List< D, Alloc >::operator[] | ( | unsigned long | idx | ) |

inlinenoexcept

Random access.

Complexity is O(n).

Definition at line 397 of file list.

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

- l4/cxx/list