mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-10 18:59:01 +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.
|
// This may happen when a second exceptions is raise in a destructor.
|
||||||
static bool no_more_assert = false;
|
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
|
#define EI_PP_MAKE_STRING2(S) #S
|
||||||
@ -88,7 +92,7 @@
|
|||||||
|
|
||||||
#define assert(a) if( (!(a)) && (!no_more_assert) ) { \
|
#define assert(a) if( (!(a)) && (!no_more_assert) ) { \
|
||||||
Eigen::no_more_assert = true; \
|
Eigen::no_more_assert = true; \
|
||||||
throw Eigen::ei_assert_exception(); \
|
throw Eigen::ei_assert_exception(""); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VERIFY_RAISES_ASSERT(a) {\
|
#define VERIFY_RAISES_ASSERT(a) {\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user