aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Dot.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-01-26 15:35:44 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-01-26 15:35:44 +0100
commit94acccc126d430bf34587527d84ff9b389219c2f (patch)
tree12608b87a19e09d278cdef898144305a4ecf6efb /Eigen/src/Core/Dot.h
parent34694d88285f69131eb96e9f496f35da5165c36d (diff)
Fix Random().normalized() by introducing a nested_eval helper (recall that the old nested<> class is deprecated)
Diffstat (limited to 'Eigen/src/Core/Dot.h')
-rw-r--r--Eigen/src/Core/Dot.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h
index 718de5d1a..38f6fbf44 100644
--- a/Eigen/src/Core/Dot.h
+++ b/Eigen/src/Core/Dot.h
@@ -141,8 +141,13 @@ template<typename Derived>
inline const typename MatrixBase<Derived>::PlainObject
MatrixBase<Derived>::normalized() const
{
- typedef typename internal::nested<Derived>::type Nested;
+#ifndef EIGEN_TEST_EVALUATORS
+ typedef typename internal::nested<Derived,2>::type Nested;
typedef typename internal::remove_reference<Nested>::type _Nested;
+#else
+ typedef typename internal::nested_eval<Derived,2>::type _Nested;
+// typedef typename internal::remove_reference<Nested>::type _Nested;
+#endif // EIGEN_TEST_EVALUATORS
_Nested n(derived());
return n / n.norm();
}