aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r--Eigen/src/Core/util/Macros.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index fca94a989..1f90847f9 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -959,9 +959,8 @@
#undef EIGEN_INTERNAL_DEBUGGING
#endif
- #ifdef EIGEN_EXCEPTIONS
- #undef EIGEN_EXCEPTIONS
- #endif
+ #undef EIGEN_USE_EXCEPTIONS
+ #define EIGEN_USE_EXCEPTIONS 0
#endif
#if defined(SYCL_DEVICE_ONLY)
@@ -1378,12 +1377,16 @@ namespace Eigen {
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME)
-#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_USE_SYCL) && !defined(EIGEN_HIP_DEVICE_COMPILE)
- #define EIGEN_EXCEPTIONS
+#ifndef EIGEN_USE_EXCEPTIONS
+ #if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_USE_SYCL) && !defined(EIGEN_HIP_DEVICE_COMPILE)
+ #define EIGEN_USE_EXCEPTIONS 1
+ #else
+ #define EIGEN_USE_EXCEPTIONS 0
+ #endif
#endif
-#ifdef EIGEN_EXCEPTIONS
+#if EIGEN_USE_EXCEPTIONS
# define EIGEN_THROW_X(X) throw X
# define EIGEN_THROW throw
# define EIGEN_TRY try