can be an element that is implicitly convertible to T, an input range of such elements, or another Array
a reference to this array
Complexity: O(n + m), where m is the number of elements in rhs.
import std.algorithm.comparison : equal; Array!int a; auto a2 = Array!int(4, 5); assert(a.empty); a ~= 1; a ~= [2, 3]; assert(equal(a, [1, 2, 3])); // append an input range a ~= a2; assert(equal(a, [1, 2, 3, 4, 5])); a2.front = 0; assert(equal(a, [1, 2, 3, 4, 5]));
Append the elements of rhs at the end of the array.
If no allocator was provided when the list was created, the GCAllocator.std.experimental.allocator.gc_allocator. will be used.