Remove copy_bool workaround for gcc 4.3

This commit is contained in:
Tobias Schlüter 2022-03-08 17:43:11 +00:00 committed by Rasmus Munk Larsen
parent 3a9d404d76
commit 9883108f3a
2 changed files with 1 additions and 7 deletions

View File

@ -872,11 +872,6 @@
#define eigen_plain_assert(x) #define eigen_plain_assert(x)
#endif #endif
#else #else
namespace Eigen {
namespace internal {
inline bool copy_bool(bool b) { return b; }
}
}
#define eigen_plain_assert(x) assert(x) #define eigen_plain_assert(x) assert(x)
#endif #endif

View File

@ -302,9 +302,8 @@ namespace Eigen
#endif //EIGEN_EXCEPTIONS #endif //EIGEN_EXCEPTIONS
#elif !defined(__CUDACC__) && !defined(__HIPCC__) && !defined(SYCL_DEVICE_ONLY) // EIGEN_DEBUG_ASSERTS #elif !defined(__CUDACC__) && !defined(__HIPCC__) && !defined(SYCL_DEVICE_ONLY) // EIGEN_DEBUG_ASSERTS
// see bug 89. The copy_bool here is working around a bug in gcc <= 4.3
#define eigen_assert(a) \ #define eigen_assert(a) \
if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\ if( (!(a)) && (!no_more_assert) ) \
{ \ { \
Eigen::no_more_assert = true; \ Eigen::no_more_assert = true; \
if(report_on_cerr_on_assert_failure) \ if(report_on_cerr_on_assert_failure) \