mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Implement better static assertion checking to make sure that the first assertion is a static one and not a runtime one.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EIGEN_STATIC_ASSERT
|
||||
#ifndef EIGEN_NO_STATIC_ASSERT
|
||||
|
||||
#if EIGEN_MAX_CPP_VER>=11 && (__has_feature(cxx_static_assert) || (defined(__cplusplus) && __cplusplus >= 201103L) || (EIGEN_COMP_MSVC >= 1600))
|
||||
@@ -132,7 +133,7 @@
|
||||
#define EIGEN_STATIC_ASSERT(CONDITION,MSG) eigen_assert((CONDITION) && #MSG);
|
||||
|
||||
#endif // EIGEN_NO_STATIC_ASSERT
|
||||
|
||||
#endif // EIGEN_STATIC_ASSERT
|
||||
|
||||
// static assertion failing if the type \a TYPE is not a vector type
|
||||
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE) \
|
||||
|
||||
Reference in New Issue
Block a user