Add numeric_limits min and max for bool

This will allow (among other things) computation of argmax and argmin of bool tensors
This commit is contained in:
Akshay Naresh Modi
2020-04-06 23:38:57 +00:00
committed by Rasmus Munk Larsen
parent 54a0a9c9dd
commit bcc0e9e15c
2 changed files with 11 additions and 0 deletions

View File

@@ -284,6 +284,8 @@ private:
// Empty specialization for void to allow template specialization based on NumTraits<T>::Real with T==void and SFINAE.
template<> struct NumTraits<void> {};
template<> NumTraits<bool> : GenericNumTraits<bool> {};
} // end namespace Eigen
#endif // EIGEN_NUMTRAITS_H