diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-06-19 18:12:40 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-06-19 18:12:40 +0200 |
commit | 6b33b29f00283ecb60389df0cca8729fe02f1b6c (patch) | |
tree | 912ee66dff61b79a6f0b64e9c2971edc530d2ba3 /Eigen/src/Core/util | |
parent | 846b227bb7cb75b15d56b864fd294e028a33db3a (diff) |
Get rid of must_nest_by_value
Diffstat (limited to 'Eigen/src/Core/util')
-rw-r--r-- | Eigen/src/Core/util/XprHelper.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 8e12ce5a0..2cd78576e 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -312,9 +312,6 @@ template<typename T> struct plain_matrix_type_row_major > type; }; -// TODO we should be able to get rid of this one too -template<typename T> struct must_nest_by_value { enum { ret = false }; }; - /** \internal The reference selector for template expressions. The idea is that we don't * need to use references for expressions since they are light weight proxy * objects which should generate no copying overhead. */ @@ -326,6 +323,12 @@ struct ref_selector T const&, const T >::type type; + + typedef typename conditional< + bool(traits<T>::Flags & NestByRefBit), + T &, + T + >::type non_const_type; }; /** \internal Adds the const qualifier on the value-type of T2 if and only if T1 is a const type */ |