Fix compile issues for gcc 4.8.

- Move constructors can only be defaulted as NOEXCEPT if all members
have NOEXCEPT move constructors.
- gcc 4.8 has some funny parsing bug in `a < b->c`, thinking `b-` is a template parameter.
This commit is contained in:
Antonio Sanchez
2021-07-01 12:47:52 -07:00
committed by Rasmus Munk Larsen
parent 154f00e9ea
commit 6035da5283
2 changed files with 6 additions and 6 deletions

View File

@@ -372,7 +372,7 @@ template <typename T> struct ArgMaxTupleReducer
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T t, T* accum) const {
if (t.second < accum->second) {
return;
} else if (t.second > accum->second || t.first < accum->first) {
} else if (t.second > accum->second || accum->first > t.first ) {
*accum = t;
}
}
@@ -400,7 +400,7 @@ template <typename T> struct ArgMinTupleReducer
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const T& t, T* accum) const {
if (t.second > accum->second) {
return;
} else if (t.second < accum->second || t.first < accum->first) {
} else if (t.second < accum->second || accum->first > t.first) {
*accum = t;
}
}