remove the hack to make the static assertion on types actually show up.

indeed, now that we use the meta selector for transposing as needed, the static asserts work very well.
This commit is contained in:
Benoit Jacob 2010-02-28 11:10:13 -05:00
parent 07023b94d8
commit f1f3c30ddc

View File

@ -29,7 +29,6 @@
// with mismatched types, the compiler emits errors about failing to instantiate cwiseProduct BEFORE
// looking at the static assertions. Thus this is a trick to get better compile errors.
template<typename T, typename U,
bool IsSameType = ei_is_same_type<typename T::Scalar, typename U::Scalar>::ret,
// the NeedToTranspose condition here is taken straight from Assign.h
bool NeedToTranspose = T::IsVectorAtCompileTime
&& U::IsVectorAtCompileTime
@ -47,7 +46,7 @@ struct ei_dot_nocheck
};
template<typename T, typename U>
struct ei_dot_nocheck<T, U, true, true>
struct ei_dot_nocheck<T, U, true>
{
static inline typename ei_traits<T>::Scalar run(const MatrixBase<T>& a, const MatrixBase<U>& b)
{
@ -55,15 +54,6 @@ struct ei_dot_nocheck<T, U, true, true>
}
};
template<typename T, typename U, bool NeedToTranspose>
struct ei_dot_nocheck<T, U, false, NeedToTranspose>
{
static inline typename ei_traits<T>::Scalar run(const MatrixBase<T>&, const MatrixBase<U>&)
{
return typename ei_traits<T>::Scalar(0);
}
};
/** \returns the dot product of *this with other.
*
* \only_for_vectors