mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-16 11:23:14 +08:00
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 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
|
||||
{
|
||||
return derived();
|
||||
|
@ -504,8 +504,12 @@ template<typename Derived> class MatrixBase
|
||||
|
||||
|
||||
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.
|
||||
*
|
||||
* Notice that in the case of a plain matrix or vector (not an expression) this function just returns
|
||||
|
Loading…
x
Reference in New Issue
Block a user