xo-alloc / xo-ordinaltree: + concepts + allocator-aware
This commit is contained in:
parent
27001fcdbc
commit
72e8db30e1
9 changed files with 198 additions and 111 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue