diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-07-29 16:33:07 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-07-29 16:33:07 +0000 |
commit | 842c4f8bfa51008ab13919225f95b56e6cbcc655 (patch) | |
tree | 777584717ed1737ab1527c36d5392d1016f1d2c9 /Eigen/src/Core/CwiseBinaryOp.h | |
parent | e0215ee5101ad0d656509902bdb46ab61551865e (diff) |
Several compilation fixes for MSVC and NVCC, basically:
- added explicit enum to int conversion where needed
- if a function is not defined as declared and the return type is "tricky"
then the type must be typedefined somewhere. A "tricky return type" can be:
* a template class with a default parameter which depends on another template parameter
* a nested template class, or type of a nested template class
Diffstat (limited to 'Eigen/src/Core/CwiseBinaryOp.h')
-rw-r--r-- | Eigen/src/Core/CwiseBinaryOp.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h index ac5440c22..51c1f9e43 100644 --- a/Eigen/src/Core/CwiseBinaryOp.h +++ b/Eigen/src/Core/CwiseBinaryOp.h @@ -186,10 +186,10 @@ MatrixBase<Derived>::operator+=(const MatrixBase<OtherDerived>& other) */ template<typename ExpressionType> template<typename OtherDerived> -inline const typename Cwise<ExpressionType>::template BinOp<ei_scalar_product_op, OtherDerived>::ReturnType +inline const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_product_op) Cwise<ExpressionType>::operator*(const MatrixBase<OtherDerived> &other) const { - return typename BinOp<ei_scalar_product_op, OtherDerived>::ReturnType(_expression(), other.derived()); + return EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_product_op)(_expression(), other.derived()); } /** \returns an expression of the coefficient-wise quotient of *this and \a other @@ -198,10 +198,10 @@ Cwise<ExpressionType>::operator*(const MatrixBase<OtherDerived> &other) const */ template<typename ExpressionType> template<typename OtherDerived> -inline const typename Cwise<ExpressionType>::template BinOp<ei_scalar_quotient_op, OtherDerived>::ReturnType +inline const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_quotient_op) Cwise<ExpressionType>::operator/(const MatrixBase<OtherDerived> &other) const { - return typename BinOp<ei_scalar_quotient_op, OtherDerived>::ReturnType(_expression(), other.derived()); + return EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_quotient_op)(_expression(), other.derived()); } /** \returns an expression of the coefficient-wise min of *this and \a other @@ -210,10 +210,10 @@ Cwise<ExpressionType>::operator/(const MatrixBase<OtherDerived> &other) const */ template<typename ExpressionType> template<typename OtherDerived> -inline const typename Cwise<ExpressionType>::template BinOp<ei_scalar_min_op, OtherDerived>::ReturnType +inline const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_min_op) Cwise<ExpressionType>::min(const MatrixBase<OtherDerived> &other) const { - return typename BinOp<ei_scalar_min_op, OtherDerived>::ReturnType(_expression(), other.derived()); + return EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_min_op)(_expression(), other.derived()); } /** \returns an expression of the coefficient-wise max of *this and \a other @@ -222,10 +222,10 @@ Cwise<ExpressionType>::min(const MatrixBase<OtherDerived> &other) const */ template<typename ExpressionType> template<typename OtherDerived> -inline const typename Cwise<ExpressionType>::template BinOp<ei_scalar_max_op, OtherDerived>::ReturnType +inline const EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_max_op) Cwise<ExpressionType>::max(const MatrixBase<OtherDerived> &other) const { - return typename BinOp<ei_scalar_max_op, OtherDerived>::ReturnType(_expression(), other.derived()); + return EIGEN_CWISE_BINOP_RETURN_TYPE(ei_scalar_max_op)(_expression(), other.derived()); } /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other |