mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-25 18:50:40 +08:00
fixed an issue with VERIFY_ASSERT
This commit is contained in:
parent
35bce20954
commit
16257d44dd
@ -44,7 +44,11 @@
|
||||
// This may happen when a second exceptions is raise in a destructor.
|
||||
static bool no_more_assert = false;
|
||||
|
||||
struct ei_assert_exception {};
|
||||
struct ei_assert_exception
|
||||
{
|
||||
ei_assert_exception(void) {}
|
||||
~ei_assert_exception() { Eigen::no_more_assert = false; }
|
||||
};
|
||||
}
|
||||
|
||||
#define EI_PP_MAKE_STRING2(S) #S
|
||||
@ -88,7 +92,7 @@
|
||||
|
||||
#define assert(a) if( (!(a)) && (!no_more_assert) ) { \
|
||||
Eigen::no_more_assert = true; \
|
||||
throw Eigen::ei_assert_exception(); \
|
||||
throw Eigen::ei_assert_exception(""); \
|
||||
}
|
||||
|
||||
#define VERIFY_RAISES_ASSERT(a) {\
|
||||
|
Loading…
x
Reference in New Issue
Block a user