xo-alloc / xo-ordinaltree: + concepts + allocator-aware

This commit is contained in:
Roland Conybeare 2025-12-03 15:36:59 -05:00
commit 3c3709ba15
2 changed files with 5 additions and 2 deletions

View file

@ -38,7 +38,7 @@ namespace xo {
return dynamic_cast<Object*>(x.ptr());
}
virtual ~Object() = default;
virtual ~Object() noexcept = default;
/** memory allocator for objects. Likely this will be a GC instance,
* but simple arena also supported.
@ -129,6 +129,9 @@ namespace xo {
virtual std::size_t _forward_children(gc::IAlloc * gc) override = 0;
};
static_assert(std::is_destructible_v<Object>, "Object must be destructible");
static_assert(std::is_nothrow_destructible_v<Object>, "Object must be noexcept destructible");
template <typename T>
void
Object::assign_member(gp<IObject> parent, gp<T> * lhs, gp<IObject> rhs)

View file

@ -200,7 +200,7 @@ namespace xo {
//: member2_{mem2, vector_allocator_type(alloc)}, ctor_ran_{true} {}
vector_type member2_;
std::size_t ctor_ran_ = false;
bool ctor_ran_ = false;
};
}