aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/StaticAssert.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-07-02 09:35:37 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-07-02 09:35:37 +0200
commit61b88d2feb8f23d1ba122f2c9a73abb183ebb25d (patch)
treeda8fbb7e88c6668bbf4b63e2c988697d95f9f2de /Eigen/src/Core/util/StaticAssert.h
parent8f4cdbbc8f9b2214b906412701722a150cba3460 (diff)
parentbf334b8ae51725754f525c2ffcfbd83ffc55ff2e (diff)
merge with default branch
Diffstat (limited to 'Eigen/src/Core/util/StaticAssert.h')
-rw-r--r--Eigen/src/Core/util/StaticAssert.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/Eigen/src/Core/util/StaticAssert.h b/Eigen/src/Core/util/StaticAssert.h
index eff12486d..54a16ebf2 100644
--- a/Eigen/src/Core/util/StaticAssert.h
+++ b/Eigen/src/Core/util/StaticAssert.h
@@ -109,9 +109,9 @@
{Eigen::internal::static_assertion<bool(CONDITION)>::MSG;}
#else
-
+ // In some cases clang interprets bool(CONDITION) as function declaration
#define EIGEN_STATIC_ASSERT(CONDITION,MSG) \
- if (Eigen::internal::static_assertion<bool(CONDITION)>::MSG) {}
+ if (Eigen::internal::static_assertion<static_cast<bool>(CONDITION)>::MSG) {}
#endif
@@ -170,13 +170,8 @@
) \
)
-#ifdef EIGEN2_SUPPORT
- #define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE) \
- eigen_assert(!NumTraits<Scalar>::IsInteger);
-#else
- #define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE) \
+#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE) \
EIGEN_STATIC_ASSERT(!NumTraits<TYPE>::IsInteger, THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES)
-#endif
// static assertion failing if it is guaranteed at compile-time that the two matrix expression types have different sizes