diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2013-11-13 16:47:02 +0100 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2013-11-13 16:47:02 +0100 |
commit | e59b38abef4dec8e37037284760607d3e108958f (patch) | |
tree | 0c623c5af99f8ffc59e53bdb812bbeb05e0df846 /Eigen | |
parent | 8f2d068e8412a6aa446de974742b633dc3b2af76 (diff) |
Implement boolean reductions for zero-sized objects
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/BooleanRedux.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/BooleanRedux.h b/Eigen/src/Core/BooleanRedux.h index 6e37e031a..be9f48a8c 100644 --- a/Eigen/src/Core/BooleanRedux.h +++ b/Eigen/src/Core/BooleanRedux.h @@ -29,9 +29,9 @@ struct all_unroller }; template<typename Derived> -struct all_unroller<Derived, 1> +struct all_unroller<Derived, 0> { - static inline bool run(const Derived &mat) { return mat.coeff(0, 0); } + static inline bool run(const Derived &/*mat*/) { return true; } }; template<typename Derived> @@ -55,9 +55,9 @@ struct any_unroller }; template<typename Derived> -struct any_unroller<Derived, 1> +struct any_unroller<Derived, 0> { - static inline bool run(const Derived &mat) { return mat.coeff(0, 0); } + static inline bool run(const Derived & /*mat*/) { return false; } }; template<typename Derived> |