Add an overload for aligned deletes which just calls the normal operator delete

This commit is contained in:
apio 2022-12-24 11:49:12 +01:00
parent f2cc797599
commit f71ccde833
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@ void raw_free(void*);
void* operator new(usize size, const std::nothrow_t&) noexcept;
void* operator new[](usize size, const std::nothrow_t&) noexcept;
void operator delete(void* ptr, usize size, std::align_val_t alignment) noexcept;
template <typename T, class... Args> [[nodiscard]] Result<T*> make(Args... args)
{

View File

@ -23,3 +23,8 @@ void raw_free(void* ptr)
return free(ptr);
#endif
}
void operator delete(void* ptr, usize size, std::align_val_t) noexcept
{
operator delete(ptr, size);
}