const-qualify template parameters representing const arguments to expressions.

needed to fix docs compile issue.
This commit is contained in:
Benoit Jacob 2011-01-24 08:27:06 -05:00
parent 5331fa3033
commit c3a4f6b5c5
11 changed files with 69 additions and 69 deletions

View File

@ -71,7 +71,7 @@ class DiagonalBase : public EigenBase<Derived>
const DiagonalProduct<MatrixDerived, Derived, OnTheLeft>
operator*(const MatrixBase<MatrixDerived> &matrix) const;
inline const DiagonalWrapper<CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, DiagonalVectorType> >
inline const DiagonalWrapper<CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const DiagonalVectorType> >
inverse() const
{
return diagonal().cwiseInverse();

View File

@ -755,7 +755,7 @@ MatrixBase<Derived>::triangularView() const
/** \returns true if *this is approximately equal to an upper triangular matrix,
* within the precision given by \a prec.
*
* \sa isLowerTriangular(), extract(), part(), marked()
* \sa isLowerTriangular()
*/
template<typename Derived>
bool MatrixBase<Derived>::isUpperTriangular(RealScalar prec) const
@ -780,7 +780,7 @@ bool MatrixBase<Derived>::isUpperTriangular(RealScalar prec) const
/** \returns true if *this is approximately equal to a lower triangular matrix,
* within the precision given by \a prec.
*
* \sa isUpperTriangular(), extract(), part(), marked()
* \sa isUpperTriangular()
*/
template<typename Derived>
bool MatrixBase<Derived>::isLowerTriangular(RealScalar prec) const

View File

@ -447,8 +447,8 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
/** Returns the expression of the sum of the vector \a other to each subvector of \c *this */
template<typename OtherDerived> EIGEN_STRONG_INLINE
CwiseBinaryOp<internal::scalar_sum_op<Scalar>,
ExpressionTypeNestedCleaned,
typename ExtendedType<OtherDerived>::Type>
const ExpressionTypeNestedCleaned,
const typename ExtendedType<OtherDerived>::Type>
operator+(const DenseBase<OtherDerived>& other) const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived);
@ -458,8 +458,8 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
/** Returns the expression of the difference between each subvector of \c *this and the vector \a other */
template<typename OtherDerived>
CwiseBinaryOp<internal::scalar_difference_op<Scalar>,
ExpressionTypeNestedCleaned,
typename ExtendedType<OtherDerived>::Type>
const ExpressionTypeNestedCleaned,
const typename ExtendedType<OtherDerived>::Type>
operator-(const DenseBase<OtherDerived>& other) const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived);

View File

@ -342,10 +342,10 @@
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,FUNCTOR) \
template<typename OtherDerived> \
EIGEN_STRONG_INLINE const CwiseBinaryOp<FUNCTOR<Scalar>, Derived, OtherDerived> \
EIGEN_STRONG_INLINE const CwiseBinaryOp<FUNCTOR<Scalar>, const Derived, const OtherDerived> \
METHOD(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
{ \
return CwiseBinaryOp<FUNCTOR<Scalar>, Derived, OtherDerived>(derived(), other.derived()); \
return CwiseBinaryOp<FUNCTOR<Scalar>, const Derived, const OtherDerived>(derived(), other.derived()); \
}
// the expression type of a cwise product
@ -355,8 +355,8 @@
typename internal::traits<LHS>::Scalar, \
typename internal::traits<RHS>::Scalar \
>, \
LHS, \
RHS \
const LHS, \
const RHS \
>
#endif // EIGEN_MACROS_H

View File

@ -121,7 +121,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
/** \returns the center of the box */
inline const CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>,
CwiseBinaryOp<internal::scalar_sum_op<Scalar>, VectorType, VectorType> >
const CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const VectorType, const VectorType> >
center() const
{ return (m_min+m_max)/2; }
@ -129,7 +129,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
* Note that this function does not get the same
* result for integral or floating scalar types: see
*/
inline const CwiseBinaryOp< internal::scalar_difference_op<Scalar>, VectorType, VectorType> sizes() const
inline const CwiseBinaryOp< internal::scalar_difference_op<Scalar>, const VectorType, const VectorType> sizes() const
{ return m_max - m_min; }
/** \returns the volume of the bounding box */
@ -140,7 +140,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
* if the length of the diagonal is needed: diagonal().norm()
* will provide it.
*/
inline CwiseBinaryOp< internal::scalar_difference_op<Scalar>, VectorType, VectorType> diagonal() const
inline CwiseBinaryOp< internal::scalar_difference_op<Scalar>, const VectorType, const VectorType> diagonal() const
{ return sizes(); }
/** \returns the vertex of the bounding box at the corner defined by

View File

@ -14,10 +14,10 @@ operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
* \sa MatrixBase::cwiseQuotient
*/
template<typename OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>
operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
}
/** \returns an expression of the coefficient-wise min of \c *this and \a other
@ -111,13 +111,13 @@ EIGEN_MAKE_CWISE_BINARY_OP(operator!=,std::not_equal_to)
*
* \sa operator+=(), operator-()
*/
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
operator+(const Scalar& scalar) const
{
return CwiseUnaryOp<internal::scalar_add_op<Scalar>, Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
return CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
}
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, Derived>
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
operator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
{
return other + scalar;
@ -130,13 +130,13 @@ operator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>&
*
* \sa operator+(), operator-=()
*/
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
operator-(const Scalar& scalar) const
{
return *this + (-scalar);
}
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, CwiseUnaryOp<internal::scalar_opposite_op<Scalar>,Derived> >
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived> >
operator-(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
{
return (-other) + scalar;

View File

@ -7,7 +7,7 @@
*
* \sa abs2()
*/
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>, Derived>
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived>
abs() const
{
return derived();
@ -20,7 +20,7 @@ abs() const
*
* \sa abs(), square()
*/
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, Derived>
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived>
abs2() const
{
return derived();
@ -33,7 +33,7 @@ abs2() const
*
* \sa pow(), log(), sin(), cos()
*/
inline const CwiseUnaryOp<internal::scalar_exp_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_exp_op<Scalar>, const Derived>
exp() const
{
return derived();
@ -46,7 +46,7 @@ exp() const
*
* \sa exp()
*/
inline const CwiseUnaryOp<internal::scalar_log_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived>
log() const
{
return derived();
@ -59,7 +59,7 @@ log() const
*
* \sa pow(), square()
*/
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived>
sqrt() const
{
return derived();
@ -72,7 +72,7 @@ sqrt() const
*
* \sa sin(), exp()
*/
inline const CwiseUnaryOp<internal::scalar_cos_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived>
cos() const
{
return derived();
@ -86,7 +86,7 @@ cos() const
*
* \sa cos(), exp()
*/
inline const CwiseUnaryOp<internal::scalar_sin_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived>
sin() const
{
return derived();
@ -100,10 +100,10 @@ sin() const
*
* \sa exp(), log()
*/
inline const CwiseUnaryOp<internal::scalar_pow_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_pow_op<Scalar>, const Derived>
pow(const Scalar& exponent) const
{
return CwiseUnaryOp<internal::scalar_pow_op<Scalar>,Derived>
return CwiseUnaryOp<internal::scalar_pow_op<Scalar>, const Derived>
(derived(), internal::scalar_pow_op<Scalar>(exponent));
}
@ -115,7 +115,7 @@ pow(const Scalar& exponent) const
*
* \sa operator/(), operator*()
*/
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived>
inverse() const
{
return derived();
@ -128,7 +128,7 @@ inverse() const
*
* \sa operator/(), operator*(), abs2()
*/
inline const CwiseUnaryOp<internal::scalar_square_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived>
square() const
{
return derived();
@ -141,16 +141,16 @@ square() const
*
* \sa square(), pow()
*/
inline const CwiseUnaryOp<internal::scalar_cube_op<Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived>
cube() const
{
return derived();
}
#define EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(METHOD_NAME,FUNCTOR) \
inline const CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
inline const CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >, const Derived> \
METHOD_NAME(const Scalar& s) const { \
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >, const Derived> \
(derived(), std::bind2nd(FUNCTOR<Scalar>(), s)); \
}

View File

@ -53,9 +53,9 @@ EIGEN_MAKE_CWISE_BINARY_OP(operator+,internal::scalar_sum_op)
* \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct()
*/
template<typename CustomBinaryOp, typename OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<CustomBinaryOp, Derived, OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>
binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other, const CustomBinaryOp& func = CustomBinaryOp()) const
{
return CwiseBinaryOp<CustomBinaryOp, Derived, OtherDerived>(derived(), other.derived(), func);
return CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>(derived(), other.derived(), func);
}

View File

@ -28,17 +28,17 @@
#ifndef EIGEN_PARSED_BY_DOXYGEN
/** \internal Represents a scalar multiple of an expression */
typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, Derived> ScalarMultipleReturnType;
typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, const Derived> ScalarMultipleReturnType;
/** \internal Represents a quotient of an expression by a scalar*/
typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, Derived> ScalarQuotient1ReturnType;
typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, const Derived> ScalarQuotient1ReturnType;
/** \internal the return type of conjugate() */
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Derived>,
const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, const Derived>,
const Derived&
>::type ConjugateReturnType;
/** \internal the return type of real() const */
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
const CwiseUnaryOp<internal::scalar_real_op<Scalar>, Derived>,
const CwiseUnaryOp<internal::scalar_real_op<Scalar>, const Derived>,
const Derived&
>::type RealReturnType;
/** \internal the return type of real() */
@ -47,7 +47,7 @@ typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
Derived&
>::type NonConstRealReturnType;
/** \internal the return type of imag() const */
typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, Derived> ImagReturnType;
typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, const Derived> ImagReturnType;
/** \internal the return type of imag() */
typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType;
@ -55,7 +55,7 @@ typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstIm
/** \returns an expression of the opposite of \c *this
*/
inline const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>,Derived>
inline const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>, const Derived>
operator-() const { return derived(); }
@ -63,7 +63,7 @@ operator-() const { return derived(); }
inline const ScalarMultipleReturnType
operator*(const Scalar& scalar) const
{
return CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, Derived>
return CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, const Derived>
(derived(), internal::scalar_multiple_op<Scalar>(scalar));
}
@ -72,18 +72,18 @@ const ScalarMultipleReturnType operator*(const RealScalar& scalar) const;
#endif
/** \returns an expression of \c *this divided by the scalar value \a scalar */
inline const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>, Derived>
inline const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>, const Derived>
operator/(const Scalar& scalar) const
{
return CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, Derived>
return CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, const Derived>
(derived(), internal::scalar_quotient1_op<Scalar>(scalar));
}
/** Overloaded for efficient real matrix times complex scalar value */
inline const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived>
inline const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
operator*(const std::complex<Scalar>& scalar) const
{
return CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived>
return CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
(*static_cast<const Derived*>(this), internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >(scalar));
}
@ -91,7 +91,7 @@ inline friend const ScalarMultipleReturnType
operator*(const Scalar& scalar, const StorageBaseType& matrix)
{ return matrix*scalar; }
inline friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived>
inline friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
operator*(const std::complex<Scalar>& scalar, const StorageBaseType& matrix)
{ return matrix*scalar; }
@ -103,7 +103,7 @@ operator*(const std::complex<Scalar>& scalar, const StorageBaseType& matrix)
* \sa class CwiseUnaryOp
*/
template<typename NewType>
typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>, Derived> >::type
typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>, const Derived> >::type
cast() const
{
return derived();
@ -150,10 +150,10 @@ imag() const { return derived(); }
* \sa class CwiseUnaryOp, class CwiseBinaryOp
*/
template<typename CustomUnaryOp>
inline const CwiseUnaryOp<CustomUnaryOp, Derived>
inline const CwiseUnaryOp<CustomUnaryOp, const Derived>
unaryExpr(const CustomUnaryOp& func = CustomUnaryOp()) const
{
return CwiseUnaryOp<CustomUnaryOp, Derived>(derived(), func);
return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
}
/** \returns an expression of a custom coefficient-wise unary operator \a func of *this
@ -168,10 +168,10 @@ unaryExpr(const CustomUnaryOp& func = CustomUnaryOp()) const
* \sa class CwiseUnaryOp, class CwiseBinaryOp
*/
template<typename CustomViewOp>
inline const CwiseUnaryView<CustomViewOp, Derived>
inline const CwiseUnaryView<CustomViewOp, const Derived>
unaryViewExpr(const CustomViewOp& func = CustomViewOp()) const
{
return CwiseUnaryView<CustomViewOp, Derived>(derived(), func);
return CwiseUnaryView<CustomViewOp, const Derived>(derived(), func);
}
/** \returns a non const expression of the real part of \c *this.

View File

@ -52,10 +52,10 @@ cwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
* \sa cwiseNotEqual(), isApprox(), isMuchSmallerThan()
*/
template<typename OtherDerived>
inline const CwiseBinaryOp<std::equal_to<Scalar>, Derived, OtherDerived>
inline const CwiseBinaryOp<std::equal_to<Scalar>, const Derived, const OtherDerived>
cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<std::equal_to<Scalar>, Derived, OtherDerived>(derived(), other.derived());
return CwiseBinaryOp<std::equal_to<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
}
/** \returns an expression of the coefficient-wise != operator of *this and \a other
@ -71,10 +71,10 @@ cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
* \sa cwiseEqual(), isApprox(), isMuchSmallerThan()
*/
template<typename OtherDerived>
inline const CwiseBinaryOp<std::not_equal_to<Scalar>, Derived, OtherDerived>
inline const CwiseBinaryOp<std::not_equal_to<Scalar>, const Derived, const OtherDerived>
cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<std::not_equal_to<Scalar>, Derived, OtherDerived>(derived(), other.derived());
return CwiseBinaryOp<std::not_equal_to<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
}
/** \returns an expression of the coefficient-wise min of *this and \a other
@ -85,10 +85,10 @@ cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
* \sa class CwiseBinaryOp, max()
*/
template<typename OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, Derived, OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived, const OtherDerived>
cwiseMin(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<internal::scalar_min_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
return CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
}
/** \returns an expression of the coefficient-wise max of *this and \a other
@ -99,10 +99,10 @@ cwiseMin(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
* \sa class CwiseBinaryOp, min()
*/
template<typename OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, Derived, OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived, const OtherDerived>
cwiseMax(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<internal::scalar_max_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
return CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
}
/** \returns an expression of the coefficient-wise quotient of *this and \a other
@ -113,8 +113,8 @@ cwiseMax(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
* \sa class CwiseBinaryOp, cwiseProduct(), cwiseInverse()
*/
template<typename OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>
cwiseQuotient(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
}

View File

@ -32,7 +32,7 @@
*
* \sa cwiseAbs2()
*/
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>,Derived>
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived>
cwiseAbs() const { return derived(); }
/** \returns an expression of the coefficient-wise squared absolute value of \c *this
@ -42,7 +42,7 @@ cwiseAbs() const { return derived(); }
*
* \sa cwiseAbs()
*/
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>,Derived>
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived>
cwiseAbs2() const { return derived(); }
/** \returns an expression of the coefficient-wise square root of *this.
@ -52,7 +52,7 @@ cwiseAbs2() const { return derived(); }
*
* \sa cwisePow(), cwiseSquare()
*/
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>,Derived>
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived>
cwiseSqrt() const { return derived(); }
/** \returns an expression of the coefficient-wise inverse of *this.
@ -62,7 +62,7 @@ cwiseSqrt() const { return derived(); }
*
* \sa cwiseProduct()
*/
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>,Derived>
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived>
cwiseInverse() const { return derived(); }
/** \returns an expression of the coefficient-wise == operator of \c *this and a scalar \a s
@ -74,7 +74,7 @@ cwiseInverse() const { return derived(); }
*
* \sa cwiseEqual(const MatrixBase<OtherDerived> &) const
*/
inline const CwiseUnaryOp<std::binder1st<std::equal_to<Scalar> >,Derived>
inline const CwiseUnaryOp<std::binder1st<std::equal_to<Scalar> >, const Derived>
cwiseEqual(const Scalar& s) const
{
return CwiseUnaryOp<std::binder1st<std::equal_to<Scalar> >,Derived>