Fix mistake: using incorrect size
This commit is contained in:
parent
cb9d61757d
commit
28f44afb4a
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ T* alignedNew(Args&& ...args)
|
|||
struct deleter {
|
||||
void operator()(T* x) const noexcept { allocator().deallocate(x, sizeof(T)); }
|
||||
};
|
||||
std::unique_ptr<T, deleter> ptr { allocator().allocate(sizeof(T)) };
|
||||
std::unique_ptr<T, deleter> ptr { allocator().allocate(1) };
|
||||
allocator().construct(ptr.get(), std::forward<Args>(args)...);
|
||||
return ptr.release();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue