From 477eb7f6307f42fe895c6fa881de9e7afff76487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Tue, 24 May 2022 16:09:59 +0000 Subject: [PATCH] Revert "Avoid ambiguous Tensor comparison operators for C++20 compatibility" This reverts commit 5c2179b6c30921d1c5ed5d6762be1f0e0e14493d --- .../Eigen/CXX11/src/Tensor/TensorBase.h | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h b/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h index abe8db2a3..3e07a6f99 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h @@ -519,36 +519,36 @@ class TensorBase } // Comparisons and tests. - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp, const Derived, const OtherDerived> - operator<(const TensorBase& other) const { + operator<(const OtherDerived& other) const { return binaryExpr(other.derived(), internal::scalar_cmp_op()); } - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp, const Derived, const OtherDerived> - operator<=(const TensorBase& other) const { + operator<=(const OtherDerived& other) const { return binaryExpr(other.derived(), internal::scalar_cmp_op()); } - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp, const Derived, const OtherDerived> - operator>(const TensorBase& other) const { + operator>(const OtherDerived& other) const { return binaryExpr(other.derived(), internal::scalar_cmp_op()); } - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp, const Derived, const OtherDerived> - operator>=(const TensorBase& other) const { + operator>=(const OtherDerived& other) const { return binaryExpr(other.derived(), internal::scalar_cmp_op()); } - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp, const Derived, const OtherDerived> - operator==(const TensorBase& other) const { + operator==(const OtherDerived& other) const { return binaryExpr(other.derived(), internal::scalar_cmp_op()); } - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp, const Derived, const OtherDerived> - operator!=(const TensorBase& other) const { + operator!=(const OtherDerived& other) const { return binaryExpr(other.derived(), internal::scalar_cmp_op()); }