ensure_capacity
container.expanding_array.ensure_capacity
Postcondition
post debug: ((capacity < new_capacity) : result.capacity = new_capacity)
0.098dev (GIT hash b44352b4c68decbc58a097b291a1c8f3a5a05486)
post debug: ((capacity < new_capacity) : result.capacity = new_capacity)
`new_capacity` and we are able to add elements without
allocating a new internal array.
This will create an `expanding_array` whose internal array
is the same of `expanding_array.this` unless the existing
capacity is less than `new_capacity` or the existing array
was already expanded using by a call to `add`.
In the latter cases, a new internal array of required capacity
will be allocated and the existing elements will be copied over.