Implement generic scalar*expr and expr*scalar operator based on scalar_product_traits.

This is especially useful for custom scalar types, e.g., to enable float*expr<multi_prec> without conversion.
This commit is contained in:
Gael Guennebaud
2016-06-02 22:16:37 +02:00
parent 8b6f53222b
commit 2c00ac0b53
7 changed files with 46 additions and 53 deletions

View File

@@ -143,8 +143,7 @@ template<typename Derived> class SparseMatrixBase
{ return *static_cast<Derived*>(const_cast<SparseMatrixBase*>(this)); }
typedef internal::special_scalar_op_base<Derived, Scalar, RealScalar, EigenBase<Derived> > Base;
using Base::operator*;
using Base::operator/;
#endif // not EIGEN_PARSED_BY_DOXYGEN
#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase