FastLED 3.9.15
Loading...
Searching...
No Matches
fl::list< T > Class Template Reference

Detailed Description

template<typename T>
class fl::list< T >

A doubly-linked list container.

This list is implemented as a doubly-linked list with sentinel nodes. It provides constant time insertion and deletion at any position when you have an iterator to that position.

Template Parameters
TThe type of elements stored in the list

Definition at line 21 of file list.h.

#include <list.h>

+ Collaboration diagram for fl::list< T >:

Classes

class  const_iterator
 
class  iterator
 
struct  Node
 

Public Types

typedef fl::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef fl::reverse_iterator< iteratorreverse_iterator
 

Public Member Functions

 list () FL_NOEXCEPT
 
 list (const list &other) FL_NOEXCEPT
 
 list (fl::initializer_list< T > init)
 
 list (fl::size count, const T &value=T())
 
 list (list &&other) FL_NOEXCEPT
 
 list (memory_resource *resource)
 
 ~list () FL_NOEXCEPT
 
T & back ()
 
const T & back () const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void clear ()
 
template<typename... Args>
void emplace_back (Args &&... args)
 
template<typename... Args>
void emplace_front (Args &&... args)
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
iterator erase (iterator first, iterator last)
 
iterator erase (iterator pos)
 
iterator find (const T &value)
 
const_iterator find (const T &value) const
 
T & front ()
 
const T & front () const
 
memory_resourceget_memory_resource () const
 
bool has (const T &value) const
 
iterator insert (iterator pos, const T &value)
 
iterator insert (iterator pos, T &&value)
 
bool operator!= (const list &other) const
 
bool operator< (const list &other) const
 
bool operator<= (const list &other) const
 
listoperator= (const list &other) FL_NOEXCEPT
 
listoperator= (list &&other) FL_NOEXCEPT
 
bool operator== (const list &other) const
 
bool operator> (const list &other) const
 
bool operator>= (const list &other) const
 
void pop_back ()
 
void pop_front ()
 
void push_back (const T &value)
 
void push_back (T &&value)
 
void push_front (const T &value)
 
void push_front (T &&value)
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
void remove (const T &value)
 
template<typename Predicate>
void remove_if (Predicate pred)
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
void resize (fl::size count)
 
void resize (fl::size count, const T &value)
 
void reverse ()
 
void shrink_to_fit ()
 
fl::size size () const
 
void sort ()
 
template<typename Compare>
void sort (Compare comp)
 
void splice (iterator pos, list &other)
 
void splice (iterator pos, list &other, iterator first, iterator last)
 
void splice (iterator pos, list &other, iterator it)
 
void swap (list &other)
 
void unique ()
 

Private Member Functions

Nodecreate_node (const T &value)
 
Nodecreate_node (T &&value)
 
void destroy_node (Node *node)
 
void destroy_sentinel ()
 
void init_sentinel ()
 
void link_before (Node *pos, Node *node)
 
void unlink (Node *node)
 

Private Attributes

NodemHead
 
memory_resourcemResource = default_memory_resource()
 
fl::size mSize
 

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