xo-alloc / xo-ordinaltree: + concepts + allocator-aware
This commit is contained in:
parent
1a8771dc5d
commit
3c3709ba15
2 changed files with 5 additions and 2 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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue