nxt.array_ex

Array container(s) with optional sortedness via template-parameter Ordering and optional use of GC via useGCAllocation.

TODO UniqueArray!(const(E)) where E has indirections

TODO Support for constructing from r-value range (container) of non-copyable elements.

TODO Add some way to implement lazy sorting either for the whole array (via bool flag) or completeSort at a certain offset (extra member).

TODO Replace = void with construction or emplace

TODO Break out common logic into private DynamicArray and reuse with `alias this` to express StandardArray, SortedArray, SortedSetArray

TODO Use std.array.insertInPlace in insert()? TODO Use std.array.replaceInPlace?

TODO Use std.algorithm.mutation.move and std.range.primitives.moveAt when moving internal sub-slices

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

TODO replace qcmeman with std.experimental.allocator parameter defaulting to Mallocator

TODO use integer_sorting.radixSort when element type isSigned or isUnsigned and above or below a certain threshold calculated by my benchmarks

TODO Remove explicit moves when DMD std.algorithm.mutation.move calls these members for us (if they exist)

Members

Enums

Assignment
enum Assignment

Semantics of copy construction and copy assignment.

Ordering
enum Ordering

Array element ordering.

isOrdered
eponymoustemplate isOrdered(Ordering ordering)

Is true iff ordering is sorted.

Functions

append
C append(C data, Args args)

Return data appended with arguments args.

withCapacityMake
R withCapacityMake(size_t capacity)

Return an instance of R with capacity capacity.

withElementMake
R withElementMake(typeof(R.init[0]) e)

Return an instance of R containing a single element e.

withLengthMake
R withLengthMake(size_t length)

Return an instance of R of length length.

Templates

isArrayContainer
template isArrayContainer(C)

Is true iff C is an instance of an Array container.

Meta