AppendBuffer.cut

Cuts the last element from the current content.

TODO: Not available if T is a static array type because a reference to the removed element would be needed to be returned, but the referenced element is erased and may theoretically relocated or deallocated (in fact it currently stays at the same location but there shouldn't be a guarantee.) Should this method be available if T is a static array type? It then would need to return 'void' or a struct with one member of type T. (Or we wait for migration to D2.)

  1. T[] cut(size_t n)
  2. T cut()
    class AppendBuffer(T, Base : AppendBufferImpl)
    static if(!static_array_element)
    T
    cut
    ()

Return Value

Type: T

the element cut from the current content (unless T is void).

In: The content must not be empty.

Meta