bug #100: add support for explicit scalar to Array conversion (as enable implicit conversion is much more tricky)

This commit is contained in:
Gael Guennebaud
2014-09-19 13:25:28 +02:00
parent 7b044c0ead
commit 0a18eecab3
4 changed files with 82 additions and 3 deletions

View File

@@ -122,6 +122,12 @@ template<typename Derived> class ArrayBase
{
internal::call_assignment(derived(), other.derived());
}
/** Set all the entries to \a value.
* \sa DenseBase::setConstant(), DenseBase::fill() */
EIGEN_DEVICE_FUNC
Derived& operator=(const Scalar &value)
{ Base::setConstant(value); return derived(); }
EIGEN_DEVICE_FUNC
Derived& operator+=(const Scalar& scalar);