[ox/std] Add std::construct_at

(synced from cf7f9b9088)
This commit is contained in:
2022-04-10 03:02:57 -05:00
parent 2deab3fcbb
commit 032c9a4251
+5
View File
@@ -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 #endif