12 template <
class InputIterator>
15 for (
auto it = first; it != last; ++it)
71 result->next =
nullptr;
83 while (current !=
nullptr)
100 template <
typename T>
104 swap(_size, stack._size);
105 swap(_top, stack._top);
108 template <
typename T>
114 template <
typename T>
117 if (_node !=
nullptr)
122 template <
typename T>
130 template <
typename T>
133 assert((_node !=
nullptr) &&
"Iterator must be valid!");
138 template <
typename T>
144 template <
typename T>
148 swap(_node, it._node);
151 template <
typename T>
157 template <
typename T>
160 if (_node !=
nullptr)
165 template <
typename T>
173 template <
typename T>
176 assert((_node !=
nullptr) &&
"Iterator must be valid!");
181 template <
typename T>
187 template <
typename T>
191 swap(_node, it._node);
194 template <
typename T>
Intrusive stack constant iterator.
const value_type & const_reference
void swap(StackConstIterator &it) noexcept
Swap two instances.
const_reference operator*() const noexcept
const value_type * const_pointer
StackConstIterator & operator++() 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.
void swap(Stack &stack) noexcept
Swap two instances.
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
StackIterator & operator++() noexcept
reference operator*() noexcept
void swap(StackIterator &it) noexcept
Swap two instances.
C++ Common project definitions.
void swap(FileCache &cache1, FileCache &cache2) noexcept
void swap(StackConstIterator< T > &it1, StackConstIterator< T > &it2) noexcept