View source code Display the source code in std/array.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

Struct std.array.RefAppender

An appender that can update an array in-place. It forwards all calls to an underlying appender implementation. Any calls made to the appender also update the pointer to the original array passed in.

Constructors

Name Description
this Construct a ref appender with a given array reference. This does not copy the data. If the array has a larger capacity as determined by arr.capacity, it will be used by the appender. RefAppender assumes that arr is a non-null value.

Properties

Name Type Description
capacity [get] size_t Returns the capacity of the array (the maximum number of elements the managed array can accommodate before triggering a reallocation). If any appending will reallocate, capacity returns 0.
data [get] inout(T)[] Returns the managed array.

Templates

Name Description
opOpAssign Appends one item to the managed array.
opOpAssign Appends an entire range to the managed array.

Authors

Andrei Alexandrescu and Jonathan M Davis

License

Boost License 1.0.

Comments