diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-12-14 22:53:47 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-12-14 22:53:47 +0100 |
commit | d357bbd9c06f4b6088de0a8e47b3e56fdd0b99b3 (patch) | |
tree | 344a2618a4d283f08816498f6da210e90bf4bb54 /Eigen/src/Core/GeneralProduct.h | |
parent | 27c068e9d6230398b74a1c7b7146d7842c509de7 (diff) |
Fix a few regression regarding temporaries and products
Diffstat (limited to 'Eigen/src/Core/GeneralProduct.h')
-rw-r--r-- | Eigen/src/Core/GeneralProduct.h | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/Eigen/src/Core/GeneralProduct.h b/Eigen/src/Core/GeneralProduct.h index 675f6ee8d..f823ff251 100644 --- a/Eigen/src/Core/GeneralProduct.h +++ b/Eigen/src/Core/GeneralProduct.h @@ -82,7 +82,8 @@ private: public: enum { - value = selector::ret + value = selector::ret, + ret = selector::ret }; #ifdef EIGEN_DEBUG_PRODUCT static void debug() @@ -98,31 +99,31 @@ public: #endif }; -template<typename Lhs, typename Rhs> struct product_tag -{ -private: - - typedef typename remove_all<Lhs>::type _Lhs; - typedef typename remove_all<Rhs>::type _Rhs; - enum { - Rows = _Lhs::RowsAtCompileTime, - Cols = _Rhs::ColsAtCompileTime, - Depth = EIGEN_SIZE_MIN_PREFER_FIXED(_Lhs::ColsAtCompileTime, _Rhs::RowsAtCompileTime) - }; - - enum { - rows_select = Rows==1 ? int(Rows) : int(Large), - cols_select = Cols==1 ? int(Cols) : int(Large), - depth_select = Depth==1 ? int(Depth) : int(Large) - }; - typedef product_type_selector<rows_select, cols_select, depth_select> selector; - -public: - enum { - ret = selector::ret - }; - -}; +// template<typename Lhs, typename Rhs> struct product_tag +// { +// private: +// +// typedef typename remove_all<Lhs>::type _Lhs; +// typedef typename remove_all<Rhs>::type _Rhs; +// enum { +// Rows = _Lhs::RowsAtCompileTime, +// Cols = _Rhs::ColsAtCompileTime, +// Depth = EIGEN_SIZE_MIN_PREFER_FIXED(_Lhs::ColsAtCompileTime, _Rhs::RowsAtCompileTime) +// }; +// +// enum { +// rows_select = Rows==1 ? int(Rows) : int(Large), +// cols_select = Cols==1 ? int(Cols) : int(Large), +// depth_select = Depth==1 ? int(Depth) : int(Large) +// }; +// typedef product_type_selector<rows_select, cols_select, depth_select> selector; +// +// public: +// enum { +// ret = selector::ret +// }; +// +// }; /* The following allows to select the kind of product at compile time * based on the three dimensions of the product. |