bug #1409: make EIGEN_MAKE_ALIGNED_OPERATOR_NEW* macros empty in c++17 mode:

- this helps clang 5 and 6 to support alignas in STL's containers.
 - this makes the public API of our (and users) classes cleaner
This commit is contained in:
Gael Guennebaud
2019-02-20 13:52:11 +01:00
parent 3b5deeb546
commit edd413c184
3 changed files with 31 additions and 1 deletions

View File

@@ -107,7 +107,7 @@ template<typename T> void check_custom_new_delete()
delete[] t;
}
#if EIGEN_MAX_ALIGN_BYTES>0
#if EIGEN_MAX_ALIGN_BYTES>0 && (!EIGEN_HAS_CXX17_OVERALIGN)
{
T* t = static_cast<T *>((T::operator new)(sizeof(T)));
(T::operator delete)(t, sizeof(T));