xo-ordinaltree: adj to drop RedBlackTree as friend of Node

This commit is contained in:
Roland Conybeare 2025-12-05 22:58:36 -05:00
commit 57197974ae
3 changed files with 11 additions and 8 deletions

View file

@ -46,11 +46,11 @@ namespace xo {
template <typename GcObjectInterface>
struct FallbackGcInterface {
template <typename Allocator>
FallbackGcInterface(Allocator & alloc) {}
FallbackGcInterface(Allocator & /*alloc*/) {}
bool check_write_barrier(const void * parent,
const void * const * lhs,
bool may_throw) { return true; };
bool check_write_barrier(const void * /*parent*/,
const void * const * /*lhs*/,
bool /*may_throw*/) { return true; };
};
/** Extended version of

View file

@ -602,13 +602,13 @@ namespace xo {
/* RB1. */
if (root_ != nullptr) {
XO_EXPECT(root_->parent_ == nullptr,
XO_EXPECT(root_->parent() == nullptr,
tostr(c_self, ": expect root->parent=nullptr",
xtag("parent", root_->parent_)));
XO_EXPECT(root_->size_ == this->size_,
xtag("parent", root_->parent())));
XO_EXPECT(root_->size() == this->size_,
tostr(c_self, ": expect self.size=root.size",
xtag("self.size", size_),
xtag("root.size", root_->size_)));
xtag("root.size", root_->size())));
}
/* height (counting only black nodes) of tree */

View file

@ -424,8 +424,11 @@ namespace xo {
private:
friend class RbTreeUtil<Key, Value, Reduce, GcObjectInterface>;
#ifdef REMOVING
template <typename Key1, typename Value1, typename Reduce1, typename Allocator>
friend class xo::tree::RedBlackTree;
#endif
private:
/* red | black */