xo-ordinaltree: start work on gc-aware Key,Value in rbtree

This commit is contained in:
Roland Conybeare 2025-12-05 19:54:00 -05:00
commit 1b93c9a427

View file

@ -5,15 +5,16 @@
#pragma once
#include "xo/reflect/TaggedPtr.hpp"
#include "IAlloc.hpp"
#include "xo/allocutil/IObject.hpp"
#include "xo/reflect/TaggedPtr.hpp"
#include "xo/allocutil/ObjectVisitor.hpp"
#include "xo/allocutil/gc_ptr.hpp"
#include <concepts>
#include <cstdint>
namespace xo {
namespace gc {
class IAlloc;
class GC;
class ObjectStatistics;
};
@ -147,6 +148,18 @@ namespace xo {
reinterpret_cast<IObject *>(rhs.ptr()));
}
namespace gc {
template <typename T>
class ObjectVisitor<gp<T>> {
public:
void forward_children(gp<T> & target,
IAlloc * gc)
{
Object::_forward_inplace(target, gc);
}
};
}
std::ostream &
operator<< (std::ostream & os, gp<Object> x);