Stack

Stack data structure wrapper around dynamic D arrays

Members

Functions

array
auto array()

direct access to array. TODO: replace with an opIndex and opIndexAssign

peek
auto peek()

peek element at the top of array

pop
auto pop()

pops one item from the stack

pop
auto pop(size_t n)

pops multiple items from the stack

push
size_t push(T item)

push an item to the stack and return its position

push
void push(T[] items)

pushes multiple items to the stack such that the last element is on the top

reserve
void reserve(size_t size)

calls reserve on array

size
auto size()

number of stack elements

size
auto size(size_t sz)

set the size directly

top
auto ref top()

the top element by reference

Meta