xo-alloc2: extend alloc_for<T> to accept explicit size
This commit is contained in:
parent
f209f7343c
commit
97d4450865
1 changed files with 2 additions and 2 deletions
|
|
@ -32,8 +32,8 @@ namespace xo {
|
|||
: Object(iface, data) {}
|
||||
|
||||
template <typename T>
|
||||
void * alloc_for() noexcept {
|
||||
return O::iface()->alloc(O::data(), typeseq::id<T>(), sizeof(T));
|
||||
void * alloc_for(size_type n = sizeof(T)) noexcept {
|
||||
return O::iface()->alloc(O::data(), typeseq::id<T>(), n);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue