Array

Small-size-optimized (SSO-packed) array of value types E.

struct Array (
E
Ordering ordering = Ordering.unsorted
bool useGC = shouldAddGCRange!E
alias less = "a < b"
) {}

Constructors

this
this(size_t n)

Construct with length n.

this
this(size_t n)
Undocumented in source.
this
this(R values, bool assumeSortedParameter)

Construct from InputRange values. If values are sorted assumeSortedParameter is true.

Destructor

~this
~this()
Undocumented in source.

Postblit

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

Members

Aliases

ME
alias ME = Unqual!E
Undocumented in source.
_free
alias _free = free
Undocumented in source.
_malloc
alias _malloc = malloc
Undocumented in source.
_realloc
alias _realloc = realloc
Undocumented in source.
append
alias append = pushBack
Undocumented in source.
comp
alias comp = binaryFun!less
Undocumented in source.
linearDeleteAt
alias linearDeleteAt = linearPopAtIndex
Undocumented in source.
linearRemoveAt
alias linearRemoveAt = linearPopAtIndex
Undocumented in source.
linsert
alias linsert = linearInsert
Undocumented in source.
opDollar
alias opDollar = length
Undocumented in source.
pack
alias pack = compress
Undocumented in source.
prepend
alias prepend = linearPushFront
Undocumented in source.

Enums

isElementAssignable
eponymoustemplate isElementAssignable(U)
Undocumented in source.

Functions

compress
void compress()

Pack/Compress storage.

compress
void compress()
Undocumented in source. Be warned that the author may not have intended to support it.
contains
bool contains(U value)
isSmall
bool isSmall()
linearInsert
bool[Us.length] linearInsert(Us values)

Inserts values into this ordered set.

linearInsert
void linearInsert(Us values)

Inserts values.

linearInsertAtIndex
void linearInsertAtIndex(size_t index, Us values)

Insert element(s) values at array offset index.

linearPopAtIndex
ContainerElementType!(typeof(this), E) linearPopAtIndex(size_t index)

Removal doesn't need to care about ordering.

linearPopFront
ContainerElementType!(typeof(this), E) linearPopFront()

Removal doesn't need to care about ordering.

linearPushFront
void linearPushFront(Us values)

Insert element(s) values at the beginning.

opOpAssign
void opOpAssign(Us values)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(R values)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(A values)
Undocumented in source. Be warned that the author may not have intended to support it.
popBack
ContainerElementType!(typeof(this), E) popBack()

Removal doesn't need to care about ordering.

pushBack
void pushBack(Us values)
void pushBack(R values)
void pushBack(A values)

Push back (append) values.

reserve
void reserve(size_t n)

Reserve room for n elements at store _storePtr.

reserve
void reserve(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
zero
void zero()
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

isString
enum isString;
Undocumented in source.
smallLength
enum smallLength;

Maximum number of elements that fits in SSO-packed

Properties

empty
bool empty [@property getter]

Check if empty.

front
E front [@property getter]

Get front element.

length
size_t length [@property getter]

Get length.

opIndex
size_t opIndex [@property setter]

Index operator must be const when ordered.

opIndex
size_t opIndex [@property setter]

Index operator overload mutable when unordered.

opSlice
auto opSlice [@property getter]
auto opSlice(size_t i, size_t j)

Slice operator must be const when ordered.

opSlice
auto opSlice [@property getter]

Slice operator overload is mutable when unordered.

reservedLength
size_t reservedLength [@property getter]

Get length of reserved store.

Variables

_length
size_t _length;
Undocumented in source.
_storeLength
size_t _storeLength;
Undocumented in source.
_storePtr
E* _storePtr;
Undocumented in source.

Meta