Array type with deterministic control of memory. The memory allocated
for the array is reclaimed as soon as possible; there is no reliance
on the garbage collector. Array uses malloc and free
for managing its own memory.
This means that pointers to elements of an Array will become
dangling as soon as the element is removed from the Array. On the other hand
the memory allocated by an Array will be scanned by the GC and
GC managed objects referenced from an Array will be kept alive.
Sets the number of elements in the container to newSize. If newSize is greater than length, the added elements are added to
unspecified positions in the container and initialized with T.init.
Removes all elements belonging to r, which must be a range
obtained originally from this container. The stable version behaves
the same, but guarantees that ranges iterating over the container are
never invalidated.
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.
Removes the value at the back of the container. The stable version
behaves the same, but guarantees that ranges iterating over the
container are never invalidated.
Removes howMany values at the front or back of the
container. Unlike the unparameterized versions above, these functions
do not throw if they could not remove howMany elements. Instead,
if howMany > 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.
Inserts value to the front or back of the container. stuff
can be a value convertible to T or a range of objects convertible
to T. The stable version behaves the same, but guarantees that
ranges iterating over the container are never invalidated.
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.
Removes the value at the back of the container. The stable version
behaves the same, but guarantees that ranges iterating over the
container are never invalidated.
Removes howMany values at the front or back of the
container. Unlike the unparameterized versions above, these functions
do not throw if they could not remove howMany elements. Instead,
if howMany > 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.
Inserts stuff before, after, or instead range r, which must
be a valid range previously extracted from this container. stuff
can be a value convertible to T or a range of objects convertible
to T. The stable version behaves the same, but guarantees that
ranges iterating over the container are never invalidated.
Inserts value to the front or back of the container. stuff
can be a value convertible to T or a range of objects convertible
to T. The stable version behaves the same, but guarantees that
ranges iterating over the container are never invalidated.
Inserts stuff before, after, or instead range r, which must
be a valid range previously extracted from this container. stuff
can be a value convertible to T or a range of objects convertible
to T. The stable version behaves the same, but guarantees that
ranges iterating over the container are never invalidated.
Inserts stuff before, after, or instead range r, which must
be a valid range previously extracted from this container. stuff
can be a value convertible to T or a range of objects convertible
to T. The stable version behaves the same, but guarantees that
ranges iterating over the container are never invalidated.
When using Array with range-based functions like those in std.algorithm,
Array must be sliced to get a range (for example, use array[].map!
instead of array.map!). The container itself is not a range.
Struct Array
Array specialized for bool. Packs together values efficiently by
allocating one bit per element.
Sets the number of elements in the container to newSize. If newSize is greater than length, the
added elements are added to the container and initialized with
ElementType.init.
Removes all elements belonging to r, which must be a range
obtained originally from this container. The stable version
behaves the same, but guarantees that ranges iterating over the
container are never invalidated.
Returns a range that iterates over all elements of the
container, in a container-defined order. The container should
choose the most convenient and fast method of iteration for opSlice().
Picks one value 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.
Removes the value at the front or back of the container. The
stable version behaves the same, but guarantees that ranges
iterating over the container are never invalidated. The
optional parameter howMany instructs removal of that many
elements. If howMany > n, all elements are removed and no
exception is thrown.
Removes howMany values at the front or back of the
container. Unlike the unparameterized versions above, these
functions do not throw if they could not remove howMany
elements. Instead, if howMany > 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.
Inserts stuff before, after, or instead range r,
which must be a valid range previously extracted from this
container. stuff can be a value convertible to ElementType or a range of objects convertible to ElementType. The stable version behaves the same, but
guarantees that ranges iterating over the container are never
invalidated.
Inserts value to the back of the container. stuff can
be a value convertible to ElementType or a range of
objects convertible to ElementType. The stable version
behaves the same, but guarantees that ranges iterating over the
container are never invalidated.
Inserts stuff before, after, or instead range r,
which must be a valid range previously extracted from this
container. stuff can be a value convertible to ElementType or a range of objects convertible to ElementType. The stable version behaves the same, but
guarantees that ranges iterating over the container are never
invalidated.
Picks one value 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.
Removes the value at the front or back of the container. The
stable version behaves the same, but guarantees that ranges
iterating over the container are never invalidated. The
optional parameter howMany instructs removal of that many
elements. If howMany > n, all elements are removed and no
exception is thrown.
Inserts stuff before, after, or instead range r,
which must be a valid range previously extracted from this
container. stuff can be a value convertible to ElementType or a range of objects convertible to ElementType. The stable version behaves the same, but
guarantees that ranges iterating over the container are never
invalidated.
Inserts stuff before, after, or instead range r,
which must be a valid range previously extracted from this
container. stuff can be a value convertible to ElementType or a range of objects convertible to ElementType. The stable version behaves the same, but
guarantees that ranges iterating over the container are never
invalidated.
Inserts value to the back of the container. stuff can
be a value convertible to ElementType or a range of
objects convertible to ElementType. The stable version
behaves the same, but guarantees that ranges iterating over the
container are never invalidated.
Inserts stuff before, after, or instead range r,
which must be a valid range previously extracted from this
container. stuff can be a value convertible to ElementType or a range of objects convertible to ElementType. The stable version behaves the same, but
guarantees that ranges iterating over the container are never
invalidated.
Inserts stuff before, after, or instead range r,
which must be a valid range previously extracted from this
container. stuff can be a value convertible to ElementType or a range of objects convertible to ElementType. The stable version behaves the same, but
guarantees that ranges iterating over the container are never
invalidated.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at ).
Comments
Red-black tree code copyright (C) 2008- by Steven Schveighoffer. Other code
copyright 2010- Andrei Alexandrescu. All rights reserved by the respective holders.