mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Introduce a NumTraits<T>::Literal type to be used for literals, and
improve mixing type support in operations between arrays and scalars: - 2 * ArrayXcf is now optimized in the sense that the integer 2 is properly promoted to a float instead of a complex<float> (fix a regression) - 2.1 * ArrayXi is now forbiden (previously, 2.1 was converted to 2) - This mechanism should be applicable to any custom scalar type, assuming NumTraits<T>::Literal is properly defined (it defaults to T)
This commit is contained in:
@@ -75,8 +75,8 @@ template <typename MatrixType> void run_nesting_ops_2(const MatrixType& _m)
|
||||
}
|
||||
else
|
||||
{
|
||||
VERIFY( verify_eval_type<1>(2*m1, 2*m1) );
|
||||
VERIFY( verify_eval_type<2>(2*m1, m1) );
|
||||
VERIFY( verify_eval_type<2>(2*m1, 2*m1) );
|
||||
VERIFY( verify_eval_type<3>(2*m1, m1) );
|
||||
}
|
||||
VERIFY( verify_eval_type<2>(m1+m1, m1+m1) );
|
||||
VERIFY( verify_eval_type<3>(m1+m1, m1) );
|
||||
|
||||
Reference in New Issue
Block a user