Dynamic circular array.
auto buffer(A) (
Takes an advantage of the system's memory mirroring capabillities to
create a memory loop so that memory copying wont be necessary once new data is concatenated.
The buffer may be manipulated normally as if it were a T and can be implicitly converted to it.
Buffer length after concatenation must be less or equal to the
size of the array.
|arg|| The initiating data for the array. If it is immutable, it is copied into a mutable buffer. An empty buffer initiation can be achieved with the |
auto buf = buffer("Hello world!");
buffer!(char, false) buf = "Hello world!";
buffer!(int, false) buf = buffer([1,2,3,4,5]);
buffer!(ulong, false) buf = buffer(cast(ulong) [1,2,3,4,5]);
~=-operator cannot be used in
@nogccode, but it does not use the GC.