An intrusive list with ownership and callbacks specified/controlled by ilist_traits, only with API safe for polymorphic types.

Synopsis

Declared in <llvm/ADT/ilist.h>

template<
    class T,
    class... Options>
class iplist
    : public iplist_impl<simple_ilist<T, Options...>, ilist_traits<T>>

Description

The Options parameters are the same as those for simple_ilist. See there for a description of what's available.

Base Classes

Name

Description

iplist_impl<simple_ilist<T, Options...>, ilist_traits<T>>

A wrapper around an intrusive list with callbacks and non‐intrusive ownership.

Type Aliases

Name

Description

const_iterator

Const bidirectional iterator.

const_pointer

Const pointer to a list element.

const_reference

Const reference to a list element.

const_reverse_iterator

Const reverse bidirectional iterator.

difference_type

Signed distance between iterators.

iterator

Mutable bidirectional iterator.

pointer

Mutable pointer to a list element.

reference

Mutable reference to a list element.

reverse_iterator

Mutable reverse bidirectional iterator.

size_type

Unsigned size type for the list.

value_type

Element type stored in the list.

Member Functions

Name

Description

iplist [constructor]

Constructors

operator=

Assignment operators

clear

Erase and delete every node in the list.

clearAndLeakNodesUnsafely

Remove all nodes from the list like clear(), but do not call removeNodeFromList() or deleteNode().

cloneFrom

Clone another list.

erase

erase overloads

getNextNode

Get the next node, or nullptr for the list tail.

getPrevNode

Get the previous node, or nullptr for the list head.

insert

insert overloads

insertAfter

Insert New immediately after where (or at begin if empty).

max_size

Return the theoretical maximum number of elements.

merge

merge overloads

pop_back

Erase and delete the last node.

pop_front

Erase and delete the first node.

push_back

Insert val at the back of the list.

push_front

Insert val at the front of the list.

remove

remove overloads

splice

splice overloads

swap

Exchange contents with RHS (currently asserts; traits‐unsafe).

Using Declarations

Name

Description

back

Return a reference to the last element.

begin

Return an iterator to the first element.

empty

Return true if the list contains no elements.

end

Return an iterator to the past‐the‐end sentinel.

front

Return a reference to the first element.

rbegin

Return a reverse iterator to the last element.

rend

Return a reverse iterator to the past‐the‐rend sentinel.

size

Return the number of elements (may be linear time).

sort

Sort the list using operator< or a provided comparator.

Created with MrDocs