diff options
author | 2008-06-04 11:16:11 +0000 | |
---|---|---|
committer | 2008-06-04 11:16:11 +0000 | |
commit | 48262b9734238e99939139047e4cb43bb1501a70 (patch) | |
tree | c22ccf363367c688c8e40237b83921e06fcc0ccc /Eigen/src/Core/Dot.h | |
parent | 60726f91a9bd49b235389f5162f00dbc27ac995d (diff) |
added a static assertion mechanism
(see notes in Core/util/StaticAssert.h for details)
Diffstat (limited to 'Eigen/src/Core/Dot.h')
-rw-r--r-- | Eigen/src/Core/Dot.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 0284ffd75..c85d9e3fb 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -79,9 +79,10 @@ MatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const Nested nested(derived()); OtherNested otherNested(other.derived()); - ei_assert(_Nested::IsVectorAtCompileTime - && _OtherNested::IsVectorAtCompileTime - && nested.size() == otherNested.size()); + EIGEN_STATIC_ASSERT_VECTOR_ONLY(_Nested); + EIGEN_STATIC_ASSERT_VECTOR_ONLY(_OtherNested); + EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(_Nested,_OtherNested); + ei_assert(nested.size() == otherNested.size()); Scalar res; const bool unroll = SizeAtCompileTime * (_Nested::CoeffReadCost + _OtherNested::CoeffReadCost + NumTraits<Scalar>::MulCost) |