12template <
class InputIterator>
15 for (
auto it = first; it != last; ++it)
71 result->next =
nullptr;
83 while (current !=
nullptr)
104 swap(_size, stack._size);
105 swap(_top, stack._top);
117 if (_node !=
nullptr)
133 assert((_node !=
nullptr) &&
"Iterator must be valid!");
148 swap(_node, it._node);
160 if (_node !=
nullptr)
176 assert((_node !=
nullptr) &&
"Iterator must be valid!");
191 swap(_node, it._node);
Intrusive stack constant iterator.
const value_type & const_reference
const_reference operator*() const noexcept
const value_type * const_pointer
StackConstIterator & operator++() noexcept
friend void swap(StackConstIterator< U > &it1, StackConstIterator< U > &it2) noexcept
const_pointer operator->() const noexcept
Intrusive stack container.
void push(T &item) noexcept
Push a new item into the top of the stack.
void reverse() noexcept
Reverse the stack.
const_iterator cend() const noexcept
T * pop() noexcept
Pop the item from the top of the stack.
iterator end() noexcept
Get the end stack iterator.
friend void swap(Stack< U > &stack1, Stack< U > &stack2) noexcept
const_iterator cbegin() const noexcept
iterator begin() noexcept
Get the begin stack iterator.
void clear() noexcept
Clear the stack.
Intrusive stack iterator.
pointer operator->() noexcept
friend void swap(StackIterator< U > &it1, StackIterator< U > &it2) noexcept
StackIterator & operator++() noexcept
reference operator*() noexcept
C++ Common project definitions.
void swap(FileCache &cache1, FileCache &cache2) noexcept