cptr::list

A doubly linked list with 4-byte links, like std::list without the allocator parameter.

Synopsis

Declared in <cptr/list.hpp>

template<
    class T,
    class Cage = default_cage>
using list = detail::basic_list<T, Cage, true>;

Description

Nodes are allocated in Cage. The members are those of std::list and behave like them, including the exception guarantees; the differences are that there is no allocator parameter (and so no get_allocator()), and that a moved-from list allocates a new sentinel when it is next inserted into. See detail::basic_list for the full member list.


#include "cptr/list.hpp"

cptr::list<int> l{1, 2, 3};
l.push_front(0);
l.sort();