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

This commit is contained in:
Gael Guennebaud 2018-06-07 15:36:20 +02:00
parent 55774b48e4
commit 7fe29aceeb

View File

@ -1030,7 +1030,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