casting to the same type no longer generates a CwiseUnaryOp
This commit is contained in:
parent
8b1e7c2792
commit
9e9e99a42e
@ -188,7 +188,11 @@ MatrixBase<Derived>::imag() const { return derived(); }
|
|||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<typename NewType>
|
template<typename NewType>
|
||||||
EIGEN_STRONG_INLINE const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived>
|
EIGEN_STRONG_INLINE
|
||||||
|
typename ei_cast_return_type<
|
||||||
|
const Derived&,
|
||||||
|
const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived>
|
||||||
|
>::type
|
||||||
MatrixBase<Derived>::cast() const
|
MatrixBase<Derived>::cast() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
|
|||||||
@ -504,8 +504,12 @@ template<typename Derived> class MatrixBase
|
|||||||
|
|
||||||
|
|
||||||
template<typename NewType>
|
template<typename NewType>
|
||||||
const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived> cast() const;
|
typename ei_cast_return_type<
|
||||||
|
const Derived&,
|
||||||
|
const CwiseUnaryOp<ei_scalar_cast_op<typename ei_traits<Derived>::Scalar, NewType>, Derived>
|
||||||
|
>::type
|
||||||
|
cast() const;
|
||||||
|
|
||||||
/** \returns the matrix or vector obtained by evaluating this expression.
|
/** \returns the matrix or vector obtained by evaluating this expression.
|
||||||
*
|
*
|
||||||
* Notice that in the case of a plain matrix or vector (not an expression) this function just returns
|
* Notice that in the case of a plain matrix or vector (not an expression) this function just returns
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user