[ox/std] Add std::construct_at
This commit is contained in:
parent
edf4571ff7
commit
cf7f9b9088
5
deps/ox/src/ox/std/memory.hpp
vendored
5
deps/ox/src/ox/std/memory.hpp
vendored
@ -28,6 +28,11 @@ struct allocator {
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, typename... Args>
|
||||
constexpr T *construct_at(T *p, Args &&...args ) {
|
||||
return new (p) T(ox::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user