View source code
							
							
						
								Display the source code in std/container/dlist.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Struct std.container.dlist.DList
Implements a doubly-linked list.
						
				struct DList(T)
				;
						
					
				DList uses reference semantics.
Constructors
| Name | Description | 
|---|---|
| this | Constructor taking a number of nodes | 
| this | Constructor taking an input range | 
Properties
| Name | Type | Description | 
|---|---|---|
| back[get] | inout(T) | Forward to opSlice(). | 
| dup[get] | DList | Duplicates the container. The elements themselves are not transitively duplicated. | 
| empty[get] | bool | Property returning trueif and only if the container has no
elements. | 
| front[get] | inout(T) | Forward to opSlice(). | 
Methods
| Name | Description | 
|---|---|
| clear | Removes all contents from the DList. | 
| insertAfter | Inserts stuffafter ranger, which must be a non-empty range
previously extracted from this container. | 
| insertBack | Inserts stuffto the front/back of the container.stuffcan be a
value convertible toTor a range of objects convertible toT. The stable version behaves the same, but guarantees that ranges
iterating over the container are never invalidated. | 
| insertBefore | Inserts stuffafter ranger, which must be a non-empty range
previously extracted from this container. | 
| insertFront | Inserts stuffto the front/back of the container.stuffcan be a
value convertible toTor a range of objects convertible toT. The stable version behaves the same, but guarantees that ranges
iterating over the container are never invalidated. | 
| linearRemove | Removes all elements belonging to r, which must be a range
obtained originally from this container. | 
| linearRemove | linearRemovefunctions asremove, but also accepts ranges that are
result the of atakeoperation. This is a convenient way to remove a
fixed amount of elements from the range. | 
| linearRemoveElement | Removes the first occurence of an element from the list in linear time. | 
| opBinary | Returns a new DListthat's the concatenation ofthisand its
argumentrhs. | 
| opBinaryRight | Returns a new DListthat's the concatenation of the argumentlhsandthis. | 
| opEquals | Comparison for equality. | 
| opOpAssign | Appends the contents of the argument rhsintothis. | 
| opSlice | Returns a range that iterates over all elements of the container, in forward order. | 
| popFirstOf | Removes first element of r, wich must be a range obtained originally
from this container, from both DList instance and ranger. | 
| popLastOf | Removes last element of r, wich must be a range obtained originally
from this container, from both DList instance and ranger. | 
| remove | Removes all elements belonging to r, which must be a range
obtained originally from this container. | 
| removeAny | Picks one value in an unspecified position in the container, removes it from the container, and returns it. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. | 
| removeBack | Removes the value at the front/back of the container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. | 
| removeBack | Removes howManyvalues at the front or back of the
container. Unlike the unparameterized versions above, these functions
do not throw if they could not removehowManyelements. Instead,
ifhowMany > n, all elements are removed. The returned value is
the effective number of elements removed. The stable version behaves
the same, but guarantees that ranges iterating over the container are
never invalidated. | 
| removeFront | Removes the value at the front/back of the container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. | 
| removeFront | Removes howManyvalues at the front or back of the
container. Unlike the unparameterized versions above, these functions
do not throw if they could not removehowManyelements. Instead,
ifhowMany > n, all elements are removed. The returned value is
the effective number of elements removed. The stable version behaves
the same, but guarantees that ranges iterating over the container are
never invalidated. | 
Inner structs
| Name | Description | 
|---|---|
| Range | Defines the container's primary range, which embodies a bidirectional range. | 
Aliases
| Name | Description | 
|---|---|
| insert | Inserts stuffto the front/back of the container.stuffcan be a
value convertible toTor a range of objects convertible toT. The stable version behaves the same, but guarantees that ranges
iterating over the container are never invalidated. | 
| stableInsert | Inserts stuffto the front/back of the container.stuffcan be a
value convertible toTor a range of objects convertible toT. The stable version behaves the same, but guarantees that ranges
iterating over the container are never invalidated. | 
| stableInsertAfter | Inserts stuffafter ranger, which must be a non-empty range
previously extracted from this container. | 
| stableInsertBack | Inserts stuffto the front/back of the container.stuffcan be a
value convertible toTor a range of objects convertible toT. The stable version behaves the same, but guarantees that ranges
iterating over the container are never invalidated. | 
| stableInsertBefore | Inserts stuffafter ranger, which must be a non-empty range
previously extracted from this container. | 
| stableInsertFront | Inserts stuffto the front/back of the container.stuffcan be a
value convertible toTor a range of objects convertible toT. The stable version behaves the same, but guarantees that ranges
iterating over the container are never invalidated. | 
| stableLinearRemove | linearRemovefunctions asremove, but also accepts ranges that are
result the of atakeoperation. This is a convenient way to remove a
fixed amount of elements from the range. | 
| stableRemove | linearRemovefunctions asremove, but also accepts ranges that are
result the of atakeoperation. This is a convenient way to remove a
fixed amount of elements from the range. | 
| stableRemoveAny | Picks one value in an unspecified position in the container, removes it from the container, and returns it. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. | 
| stableRemoveBack | Removes the value at the front/back of the container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. | 
| stableRemoveBack | Removes howManyvalues at the front or back of the
container. Unlike the unparameterized versions above, these functions
do not throw if they could not removehowManyelements. Instead,
ifhowMany > n, all elements are removed. The returned value is
the effective number of elements removed. The stable version behaves
the same, but guarantees that ranges iterating over the container are
never invalidated. | 
| stableRemoveFront | Removes the value at the front/back of the container. The stable version behaves the same, but guarantees that ranges iterating over the container are never invalidated. | 
| stableRemoveFront | Removes howManyvalues at the front or back of the
container. Unlike the unparameterized versions above, these functions
do not throw if they could not removehowManyelements. Instead,
ifhowMany > n, all elements are removed. The returned value is
the effective number of elements removed. The stable version behaves
the same, but guarantees that ranges iterating over the container are
never invalidated. | 
Authors
License
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at ).
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.