Fix MSVC warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)

(grafted from 7fe29aceeb9f7a7ec8bd6f9fa81b88d50e4819b6
)
This commit is contained in:
Gael Guennebaud 2018-06-07 15:36:20 +02:00
parent 352489edbe
commit 3df78d5afc

View File

@ -989,7 +989,13 @@ namespace Eigen {
# define EIGEN_NOEXCEPT
# define EIGEN_NOEXCEPT_IF(x)
# define EIGEN_NO_THROW throw()
# define EIGEN_EXCEPTION_SPEC(X) throw(X)
# if EIGEN_COMP_MSVC
// MSVC does not support exception specifications (warning C4290),
// and they are deprecated in c++11 anyway.
# define EIGEN_EXCEPTION_SPEC(X) throw()
# else
# define EIGEN_EXCEPTION_SPEC(X) throw(X)
# endif
#endif
#endif // EIGEN_MACROS_H