56 if (
this != std::addressof(a_rhs)) {
65 if (
this != std::addressof(a_rhs)) {
66 item = std::move(a_rhs.item);
68 next = std::move(a_rhs.next);
100 _cur(std::move(a_rhs._cur))
102 a_rhs._cur =
nullptr;
113 if (
this != std::addressof(a_rhs)) {
121 if (
this != std::addressof(a_rhs)) {
122 _cur = std::move(a_rhs._cur);
123 a_rhs._cur =
nullptr;
129 [[nodiscard]]
constexpr pointer operator->() const noexcept {
return std::addressof(_cur->item); }
158 for (
auto iter = _cur; iter; iter = iter->next) {
159 if (iter == a_rhs._cur) {
194 if (
this != std::addressof(a_rhs)) {
203 if (
this != std::addressof(a_rhs)) {
244 auto node =
new Node(a_value);
247 std::make_pair(node, node));
252 auto node =
new Node(std::move(a_value));
255 std::make_pair(node, node));
271 if (a_pos ==
cend()) {
294 template <
class... Args>
309 std::construct_at(std::addressof(
_listHead.
item), std::move(node->item));
325 auto head =
new Node(a_value);
327 for (
size_type i = 1; i < a_count; ++i) {
328 tail->next =
new Node(a_value);
332 return std::make_pair(head, tail);
340 lhs->
item = rhs->item;
343 lhs->next =
new Node(rhs->item);
350 auto [head, tail] = a_values;
353 assert(head && tail);
355 tail->next = a_pos->
next;
362 if (a_head && a_head != a_tail) {
363 auto iter = a_head->
next;
365 while (iter != a_tail) {
370 a_head->
next = a_tail;
374 template <
class... Args>
383 std::construct_at(std::addressof(
_listHead.
item), std::forward<Args>(a_args)...);
395 while (iter != last && elems != a_count) {
400 if (elems < a_count) {
403 }
else if (iter != last) {
constexpr bool operator==(const iterator_base &a_rhs) const noexcept
Definition: BSTList.h:131
constexpr reference operator*() const noexcept
Definition: BSTList.h:128
constexpr iterator_base(const iterator_base &a_rhs) noexcept
Definition: BSTList.h:95
constexpr Node * get_current() noexcept
Definition: BSTList.h:153
constexpr bool operator!=(const iterator_base &a_rhs) const noexcept
Definition: BSTList.h:132
constexpr iterator_base & operator=(iterator_base &&a_rhs) noexcept
Definition: BSTList.h:119
constexpr const Node * get_current() const noexcept
Definition: BSTList.h:154
constexpr iterator_base & operator=(const iterator_base &a_rhs) noexcept
Definition: BSTList.h:111
constexpr iterator_base(Node *a_node) noexcept
Definition: BSTList.h:105
constexpr iterator_base() noexcept
Definition: BSTList.h:91
std::forward_iterator_tag iterator_category
Definition: BSTList.h:89
~iterator_base() noexcept
Definition: BSTList.h:109
constexpr iterator_base(iterator_base &&a_rhs) noexcept
Definition: BSTList.h:99
U value_type
Definition: BSTList.h:86
U & reference
Definition: BSTList.h:88
constexpr iterator_base & operator++() noexcept
Definition: BSTList.h:135
std::ptrdiff_t difference_type
Definition: BSTList.h:85
constexpr bool comes_before(const iterator_base &a_rhs) const noexcept
Definition: BSTList.h:156
U * pointer
Definition: BSTList.h:87
constexpr pointer operator->() const noexcept
Definition: BSTList.h:129
constexpr const_iterator cend() const noexcept
Definition: BSTList.h:230
const value_type & const_reference
Definition: BSTList.h:15
constexpr const Node * get_head() const noexcept
Definition: BSTList.h:319
constexpr const_iterator end() const noexcept
Definition: BSTList.h:229
reference front()
Definition: BSTList.h:212
void resize(size_type a_count, const value_type &a_value)
Definition: BSTList.h:315
const_iterator cbegin() const
Definition: BSTList.h:226
BSSimpleList & operator=(const BSSimpleList &a_rhs)
Definition: BSTList.h:192
T value_type
Definition: BSTList.h:12
void push_front(value_type &&a_value)
Definition: BSTList.h:292
void resize(size_type a_count)
Definition: BSTList.h:314
BSSimpleList(BSSimpleList &&a_rhs)
Definition: BSTList.h:183
iterator insert_after(const_iterator a_pos, const_reference a_value)
Definition: BSTList.h:242
BSSimpleList & operator=(BSSimpleList &&a_rhs)
Definition: BSTList.h:201
iterator insert_after(const_iterator a_pos, size_type a_count, const_reference a_value)
Definition: BSTList.h:258
iterator erase_after(const_iterator a_pos)
Definition: BSTList.h:269
reference emplace_front(Args &&... a_args)
Definition: BSTList.h:295
~BSSimpleList()
Definition: BSTList.h:187
iterator begin()
Definition: BSTList.h:224
iterator_base< const value_type > const_iterator
Definition: BSTList.h:171
void emplace_front_impl(Args &&... a_args)
Definition: BSTList.h:375
iterator erase_after(const_iterator a_first, const_iterator a_last)
Definition: BSTList.h:280
const_iterator begin() const
Definition: BSTList.h:225
constexpr Node * get_head() noexcept
Definition: BSTList.h:318
void copy_from(const BSSimpleList &a_rhs)
Definition: BSTList.h:335
std::uint32_t size_type
Definition: BSTList.h:13
BSSimpleList(const BSSimpleList &a_rhs)
Definition: BSTList.h:177
constexpr iterator end() noexcept
Definition: BSTList.h:228
void erase_after_impl(Node *a_head, Node *a_tail)
Definition: BSTList.h:360
const_reference front() const
Definition: BSTList.h:218
iterator_base< value_type > iterator
Definition: BSTList.h:170
iterator insert_after(const_iterator a_pos, value_type &&a_value)
Definition: BSTList.h:250
value_type & reference
Definition: BSTList.h:14
void push_front(const_reference a_value)
Definition: BSTList.h:291
Node _listHead
Definition: BSTList.h:412
void clear()
Definition: BSTList.h:234
std::pair< Node *, Node * > alloc_copies(size_type a_count, const_reference a_value)
Definition: BSTList.h:321
BSSimpleList()
Definition: BSTList.h:173
bool empty() const
Definition: BSTList.h:232
void pop_front()
Definition: BSTList.h:301
Node * insert_after_impl(Node *a_pos, std::pair< Node *, Node * > a_values)
Definition: BSTList.h:348
void resize_impl(size_type a_count, const_reference a_value)
Definition: BSTList.h:386
Definition: AbsorbEffect.h:6
T observer
Definition: PCH.h:92
Definition: NiBinaryStream.h:94
Node()
Definition: BSTList.h:20
stl::observer< Node * > next
Definition: BSTList.h:78
Node(const Node &a_rhs)
Definition: BSTList.h:30
Node(value_type &&a_value)
Definition: BSTList.h:47
Node(value_type a_value, Node *a_next)
Definition: BSTList.h:25
value_type item
Definition: BSTList.h:77
Node(const value_type &a_value)
Definition: BSTList.h:42
Node & operator=(Node &&a_rhs)
Definition: BSTList.h:63
Node(Node &&a_rhs)
Definition: BSTList.h:35
Node & operator=(const Node &a_rhs)
Definition: BSTList.h:54