91# include <type_traits>
173 static_assert(std::is_default_constructible<T>::value,
174 "No default constructor for T");
180 static_assert(std::is_copy_constructible<T>::value,
181 "No copy constructor for T");
187 static_assert(std::is_move_constructible<T>::value,
188 "No move constructor for T");
204 static_assert(std::is_copy_constructible<T>::value,
205 "No copy constructor for T");
210 :
Dlink(std::move(node)),
data(std::move(node.data))
218 static_assert(std::is_copy_assignable<T>::value,
219 "No copy assign for T");
227 std::swap(
data, p.data);
309 return static_cast<Dnode<T>*
>(
this);
314 return static_cast<const Dnode<T>*
>(
this);
Exception handling system with formatted messages for Aleph-w.
#define ah_underflow_error_if(C)
Throws std::underflow_error if condition holds.
Standard functor implementations and comparison objects.
Dlink * get_curr() const
Return the current node of iterator.
Dlink * del()
Remove from the list the current node and move the iterator one position forward.
Dlink * get_curr_ne() const noexcept
Return the current link guaranteeing no exception. Be careful.
Dlink * del_ne() noexcept
Doubly linked circular list node.
Dlink * remove_next() noexcept
Remove the item that is after this
constexpr bool is_empty() const noexcept
Return true if this (as header node) is empty.
Dlink() noexcept
Initialize a node or an empty list.
void swap(Dlink *link) noexcept
Swap this with list whose header is link.
Dnode< T > * to_dnode() noexcept
Dlink * remove_prev() noexcept
Remove the item that is before this
Iterator on a list of Dnode objects.
Dnode< T > * get_curr_ne() const noexcept
Return the current link guaranteeing no exception. Be careful.
Dnode * del_ne() noexcept
Same as del() but without exception check.
Dnode * del()
Remove the current node of the list a return a pointer to the removed node.
Dnode< T > * get_curr() const
Return a pointer to the current node.
Node belonging to a double circular linked list with header node.
Dnode< T > *& get_next() const noexcept
Return the next node to this
Dnode< T > *& get_first() const
Get the first node.
Dnode(Dnode &&node) noexcept
Move constructor.
Dnode< T > * remove_first()
Remove the first node and return its address.
Dnode< T > * remove_next() noexcept
Remove the next node to this; return its address.
Dnode< T > * remove_first_ne() noexcept
Remove the first node and return its address.
Dnode< T > * remove_last()
Remove the last node and return its address.
const T & get_data() const noexcept
Return a modifiable reference to the data contained in the node.
Dnode & operator=(const Dnode &p)
Copy assigment.
T & get_data() noexcept
Return a modifiable reference to the data contained in the node.
Dnode & swap(Dnode &p)
Swap this with p
Dnode(T &&item)
Construct a new node with the item moved.
Dnode(const Dnode &node)
Copy constructor.
Dnode< T > *& get_first_ne() const noexcept
Get the first node.
Dnode(const T &item)
Construct a node with a copy of item
Dnode< T > *& get_prev() const noexcept
Return the previous node to this
Dnode< T > * remove_last_ne() noexcept
Remove the last node and return its address.
Dnode< T > *& get_last_ne() const noexcept
Get the last node.
static Dnode * data_to_node(T &data) noexcept
Given an reference to the data in the node, returns a pointer to the Dnode object that contains it.
Dnode< T > * remove_prev() noexcept
Remove the previous node to this; return its address.
Dnode< T > *& get_last() const
Get the last node.
const T & get_key() const noexcept
Doubly linked circular list implementation.
const long double offset[]
Offset values indexed by symbol string length (bounded by MAX_OFFSET_INDEX)
Main namespace for Aleph-w library functions.
std::decay_t< typename HeadC::Item_Type > T
DynList< T > maps(const C &c, Op op)
Classic map operation.