withCapacityMake

Return an instance of R with capacity capacity.

  1. R withCapacityMake(size_t capacity)
  2. R withCapacityMake(size_t capacity)
    R
    withCapacityMake
    (
    R
    )
    (
    size_t capacity
    )
    if (
    isDynamicArray!R
    )

Examples

immutable capacity = 10;
auto x = capacity.withCapacityMake!(int[]);
assert(x.capacity >= capacity);

Meta