[ox/std] Give AllocAlias separate size option
This commit is contained in:
parent
382df7b2af
commit
d53430abbc
4
deps/ox/src/ox/std/types.hpp
vendored
4
deps/ox/src/ox/std/types.hpp
vendored
@ -61,9 +61,9 @@ namespace ox {
|
|||||||
* Aliases type T in size and alignment to allow allocating space for a T
|
* Aliases type T in size and alignment to allow allocating space for a T
|
||||||
* without running the constructor.
|
* without running the constructor.
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T, std::size_t sz = sizeof(T)>
|
||||||
struct alignas(alignof(T)) AllocAlias {
|
struct alignas(alignof(T)) AllocAlias {
|
||||||
char buff[sizeof(T)];
|
char buff[sz];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user