mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-03 11:45:12 +08:00
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:
parent
07023b94d8
commit
f1f3c30ddc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user