From 92d22defe2a5f36b4a3eb20feb82fd3091aa93fb Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 3 Dec 2025 15:36:59 -0500 Subject: [PATCH] xo-alloc / xo-ordinaltree: + concepts + allocator-aware --- include/xo/allocutil/IObject.hpp | 2 ++ include/xo/allocutil/ObjectVisitor.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/xo/allocutil/IObject.hpp b/include/xo/allocutil/IObject.hpp index 2104888..c6f9611 100644 --- a/include/xo/allocutil/IObject.hpp +++ b/include/xo/allocutil/IObject.hpp @@ -96,6 +96,8 @@ namespace xo { virtual std::size_t _forward_children(gc::IAlloc * gc) = 0; }; + static_assert(std::is_destructible_v, "IObject must be destructible"); + /** @class Cpof * @brief argument to operator new used for garbage collector evacuation phase * diff --git a/include/xo/allocutil/ObjectVisitor.hpp b/include/xo/allocutil/ObjectVisitor.hpp index 1719ef7..276df55 100644 --- a/include/xo/allocutil/ObjectVisitor.hpp +++ b/include/xo/allocutil/ObjectVisitor.hpp @@ -34,7 +34,7 @@ namespace xo { **/ template class ObjectVisitor { - //void forward_children(T & target, IAlloc * gc) { (void)target; (void)gc; } + void forward_children(T & target, IAlloc * gc) { (void)target; (void)gc; } }; #define XO_TRIVIAL_OBJECT_VISITOR(TYPE) \