pop

A helper function to pop an item from ITypedQueue.

Note: this function performs a shallow copy of the popped item into t. if this is not desired, the caller class is to call top() method of ITypedQueue and apply desired logic on returned pointer and then call discardTop().

bool
pop
(
T
)
(,
ref T t
)

Parameters

T

type of items stored in queue

q ITypedQueue!(T)

A queue to pop from

t T

if pop succeeds, will hold item popped from q, when function ends

Return Value

Type: bool

true if top item was popped and copied to t, false otherwise

Meta