From d104d2cd29149876c4ec1d2a69960c3ef09872be Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 9 Feb 2010 11:13:22 +0100 Subject: [PATCH] add accessors to coeff based product --- Eigen/src/Core/products/CoeffBasedProduct.h | 3 +++ test/product_notemporary.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h index d947bfc58..a772b9ec8 100644 --- a/Eigen/src/Core/products/CoeffBasedProduct.h +++ b/Eigen/src/Core/products/CoeffBasedProduct.h @@ -182,6 +182,9 @@ class CoeffBasedProduct return m_result; } + const _LhsNested& lhs() const { return m_lhs; } + const _RhsNested& rhs() const { return m_rhs; } + protected: const LhsNested m_lhs; const RhsNested m_rhs; diff --git a/test/product_notemporary.cpp b/test/product_notemporary.cpp index b8bc3acc3..cddf7eb39 100644 --- a/test/product_notemporary.cpp +++ b/test/product_notemporary.cpp @@ -25,7 +25,7 @@ static int nb_temporaries; #define EIGEN_DEBUG_MATRIX_CTOR { \ - if(SizeAtCompileTime==Dynamic) \ + if(SizeAtCompileTime==Dynamic && this->data()!=0) \ nb_temporaries++; \ }