DList

struct DList (
T
) {}

Constructors

this
this(A allocator)

Constructs a qualified doubly linked list that will use the provided allocator object. For immutable objects, a RCISharedAllocator must be supplied.

this
this(U[] values)

Constructs a qualified doubly linked list out of a number of items. Because no allocator was provided, the list will use the GCAllocator.std.experimental.allocator..

this
this(A allocator, U[] values)

Constructs a qualified doubly linked list out of a number of items that will use the provided allocator object. For immutable objects, a RCISharedAllocator must be supplied.

this
this(Stuff stuff)

Constructs a qualified doubly linked list out of an input range. Because no allocator was provided, the list will use the GCAllocator.std.experimental.allocator..

this
this(A allocator, Stuff stuff)

Constructs a qualified doubly linked list out of an input range that will use the provided allocator object. For immutable objects, a RCISharedAllocator must be supplied.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

dup
typeof(this) dup()

Perform a copy of the list. This will create a new list that will copy the elements of the current list. This will NOT call dup on the elements of the list, regardless if T defines it or not.

empty
bool empty()

Check if the list is empty.

front
auto ref front()

Provide access to the first element in the list. The user must check that the list isn't empty, prior to calling this function.

insert
size_t insert(size_t pos, Stuff stuff)
size_t insert(size_t pos, Stuff[] stuff)

Inserts the elements of an input range, or a variable number of items, at the given pos.

insertBack
size_t insertBack(Stuff stuff)
size_t insertBack(Stuff[] stuff)

Inserts the elements of an input range, or a variable number of items, at the end of the list.

isUnique
bool isUnique()

Check whether there are no more references to this list instance.

opAssign
auto ref opAssign(typeof(this) rhs)

Assign rhs to this list. The current list will now become another reference to rhs, unless rhs is null, in which case the current list will become empty. If rhs refers to the current list nothing will happen.

opBinary
auto ref opBinary(U rhs)

Create a new list that results from the concatenation of this list with rhs.

opOpAssign
auto ref opOpAssign(U rhs)

Append the elements of rhs at the end of the list.

popFront
void popFront()

Advance to the next element in the list. The user must check that the list isn't empty, prior to calling this function.

popPrev
void popPrev()

Go to the previous element in the list. The user must check that the list isn't empty, prior to calling this function.

printRefCount
void printRefCount(Node* sn)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
void remove()

Remove the current element from the list. If there are no more references to the current element, then it will be destroyed.

save
Qualified save()

Perform a shallow copy of the list.

tail
Qualified tail()

Advance to the next element in the list. The user must check that the list isn't empty, prior to calling this function.

Templates

each
template each(alias fun)

Eagerly iterate over each element in the list and call fun over each element. This should be used to iterate through const and immutable lists.

Meta