xo-ordinaltree: start work on gc-aware Key,Value in rbtree
This commit is contained in:
parent
bd8ca68e7c
commit
1b93c9a427
1 changed files with 15 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue