`clear`ing a dynamic array
anonymous via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Oct 25 05:37:24 PDT 2015
On Sunday, 25 October 2015 at 11:45:53 UTC, Shriramana Sharma
wrote:
> http://dlang.org/arrays.html#resize says: """Also, you may wish
> to utilize the phobos reserve function to pre-allocate array
> data to use with the append operator."""
>
> I presume this means
> http://dlang.org/phobos/std_array.html#.Appender.reserve but
> how `append` is considered an operator is beyond me.
That sentence doesn't refer to std.array.Appender. `reserve`
means <http://dlang.org/phobos/object.html#.reserve>. The append
operator is `~=`.
More information about the Digitalmars-d-learn
mailing list