diff --git a/include/xo/alloc/Object.hpp b/include/xo/alloc/Object.hpp index 5f31356f..dce67c11 100644 --- a/include/xo/alloc/Object.hpp +++ b/include/xo/alloc/Object.hpp @@ -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 #include namespace xo { namespace gc { + class IAlloc; class GC; class ObjectStatistics; }; @@ -147,6 +148,18 @@ namespace xo { reinterpret_cast(rhs.ptr())); } + namespace gc { + template + class ObjectVisitor> { + public: + void forward_children(gp & target, + IAlloc * gc) + { + Object::_forward_inplace(target, gc); + } + }; + } + std::ostream & operator<< (std::ostream & os, gp x);