aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Macros.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-06-07 15:36:20 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-06-07 15:36:20 +0200
commit7fe29aceeb9f7a7ec8bd6f9fa81b88d50e4819b6 (patch)
treebbac96ce693048a5d116989d79e8e852d49fe7c2 /Eigen/src/Core/util/Macros.h
parent55774b48e4718763214ed9e52faa52dc2622aef0 (diff)
Fix MSVC warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r--Eigen/src/Core/util/Macros.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index 729fb3b1d..8927bd404 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -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