Patch by Kenneth Riddile: disable MSVC warnings, reenable them outside

of Eigen, and add a MSVC-friendly path in StaticAssert.
This commit is contained in:
Benoit Jacob
2008-12-18 20:48:02 +00:00
parent fabaa6915b
commit 8106d35408
11 changed files with 56 additions and 4 deletions

View File

@@ -74,8 +74,20 @@
};
};
#define EIGEN_STATIC_ASSERT(CONDITION,MSG) \
if (Eigen::ei_static_assert<CONDITION ? true : false>::MSG) {}
// Specialized implementation for MSVC to avoid "conditional
// expression is constant" warnings. This implementation doesn't
// appear to work under GCC, hence the multiple implementations.
#ifdef _MSC_VER
#define EIGEN_STATIC_ASSERT(CONDITION,MSG) \
{Eigen::ei_static_assert<CONDITION ? true : false>::MSG;}
#else
#define EIGEN_STATIC_ASSERT(CONDITION,MSG) \
if (Eigen::ei_static_assert<CONDITION ? true : false>::MSG) {}
#endif
#endif // not CXX0X