Function ScratchBuffer.tryPushBack

Appends one element when established capacity has a spare slot.

bool tryPushBack(U)(
  auto ref U value
)
if (is(Unqual!U == T) && __traits(compiles, emplace(cast(T*)null, forward!value)));

Parameters

NameDescription
value value used to construct the next live element

Returns

true when the value was appended; false when the buffer is full.

Failure

A full-buffer result performs no allocation and leaves the live prefix unchanged.

Allocation

None by the container. Operations performed by T may allocate.