aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Product.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-06-02 09:45:57 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-06-02 09:45:57 +0200
commit4ebb80490ab24c41e066c6a3082b29777adbb6e5 (patch)
tree5f645620b51f4c52a6a1ba20913040a941f2371d /Eigen/src/Core/Product.h
parent314bfa13753f153d44ff76a1c8ce0206616b06d9 (diff)
implicit conversion to scalar for inner product
Diffstat (limited to 'Eigen/src/Core/Product.h')
-rw-r--r--Eigen/src/Core/Product.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h
index 93e978779..859545aa0 100644
--- a/Eigen/src/Core/Product.h
+++ b/Eigen/src/Core/Product.h
@@ -182,6 +182,11 @@ class GeneralProduct<Lhs, Rhs, InnerProduct>
}
typename Base::Scalar value() const { return Base::coeff(0,0); }
+
+ /** Convertion to scalar */
+ operator const typename Base::Scalar() const {
+ return Base::coeff(0,0);
+ }
};
/***********************************************************************