array_ex

Array Containers.

TODO Split up Array into Array, SortedArray, SetArray and reuse logic in Array via alias this or free functions.

TODO Use std.algorithm.mutation.move and std.range.primitives.moveAt

TODO copy assignment, struct Store, Notify andralex of packed array

TODO Add c.insertAfter(r, x) where c is a collection, r is a range previously extracted from c, and x is a value convertible to collection's element type. See also: https://forum.dlang.org/post/n3qq6e$2bis$1@digitalmars.com

Members

Aliases

Small
alias Small(E, size_t n) = E[n]

Small array storage.

Enums

IsOrdered
eponymoustemplate IsOrdered(Ordering ordering)
Undocumented in source.
Ordering
enum Ordering
Undocumented in source.
isArray
eponymoustemplate isArray(C)
Undocumented in source.

Functions

free
void free(void* ptr)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
malloc
void* malloc(size_t size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
nextPow2
auto nextPow2(size_t s)

Returns s rounded up to the nearest power of 2. Taken from roundUpToPowerOf2 in allocator.

realloc
void* realloc(void* ptr, size_t size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Static functions

storeTester
void storeTester()

Test Store.

tester
void tester()
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

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

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

Large
struct Large(E, bool useGC)

Large array storage.

Store
struct Store(E, bool useGC = shouldAddGCRange!E)

Small-size-optimized (SSO) array store.

Templates

ContainerElementType
template ContainerElementType(ContainerType, ElementType)
Undocumented in source.
shouldAddGCRange
template shouldAddGCRange(T)
Undocumented in source.

Meta