Merge branch 'add_missing_delete_operators_macos' into 'master'

Add missing delete operators on MacOS

See merge request jschoeberl/netgen!287
This commit is contained in:
Joachim Schöberl 2019-10-28 14:57:33 +00:00
commit 576bcf907a

View File

@ -74,6 +74,22 @@ inline void operator delete[]( void* ptr, std::align_val_t al ) noexcept
delete[] (char*)ptr;
}
inline void operator delete ( void* ptr, std::size_t sz, std::align_val_t al ) noexcept
{
if (int(al) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
_mm_free(ptr);
else
delete (char*)ptr;
}
inline void operator delete[]( void* ptr, std::size_t sz, std::align_val_t al ) noexcept
{
if (int(al) > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
_mm_free(ptr);
else
delete[] (char*)ptr;
}
#endif // __MAC_OS_X_VERSION_MIN_REQUIRED
#endif // __MAC_OS_X_VERSION_MIN_REQUIRED < 101300