Traverse the stack with a callback for each node.
- Parameters
-
- Returns
- *this
Definition at line 349 of file stack.hpp.
References __D_ASSERT, likely, and unlikely.
353 return const_cast<stack<T>&
> (*this);
356 for (node<T> *n =
m_top;
likely(n != NULL); n = n->m_link)
357 pfunc(i++, n->m_data);
359 return const_cast<stack<T>&
> (*this);
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
node< T > * m_top
Stack top.
unsigned int u32
32-bit unsigned integer
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
#define __D_ASSERT(x)
Assertion macro.