54 if (tree.
value < newValue)
57 insert_set_sorted(newRoot, std::move(newValue));
59 std::swap(tree, newRoot);
61 tree.
children.emplace_back(tree_node<T>{std::move(newRoot)});
65 for (
auto &child : tree.children)
67 if (child.value >= newValue)
74 if (newValue >= child.value)
86 [&newValue](
const auto &item) { return !(newValue >= item.value); });
88 auto newChild = tree_node<T>{std::move(newValue)};
91 for (
auto it = itToMoved; it != tree.
children.end(); ++it)
93 newChild.children.emplace_back(std::move(*it));
96 tree.
children.emplace_back(std::move(newChild));
101 if (tree.
value == zero)
103 tree.
value = std::move(newValue);
107 tree.
children.emplace_back(tree_node<T>{std::move(newValue)});