mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
const-qualify template parameters representing const arguments to expressions.
needed to fix docs compile issue.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user