From 63abb35dfd9d57ae6a49dc7c129a3d0a1b6ab315 Mon Sep 17 00:00:00 2001 From: Erik Schultheis Date: Mon, 29 Nov 2021 22:51:26 +0000 Subject: [PATCH] SFINAE'ing away non-const overloads if selfAdjoint/triangular view is not referring to an lvalue --- Eigen/src/Core/SelfAdjointView.h | 4 ++-- Eigen/src/Core/TriangularMatrix.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index 97c2a1939..9e6026304 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -219,9 +219,9 @@ template class SelfAdjointView typedef SelfAdjointView TransposeReturnType; /** \sa MatrixBase::transpose() */ EIGEN_DEVICE_FUNC - inline TransposeReturnType transpose() + template + inline TransposeReturnType transpose(typename internal::enable_if::value, Dummy*>::type = nullptr) { - EIGEN_STATIC_ASSERT_LVALUE(MatrixType) typename MatrixType::TransposeReturnType tmp(m_matrix); return TransposeReturnType(tmp); } diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index e9a4cae19..34c072f32 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -265,9 +265,9 @@ template class TriangularView typedef TriangularView TransposeReturnType; /** \sa MatrixBase::transpose() */ EIGEN_DEVICE_FUNC - inline TransposeReturnType transpose() + template + inline TransposeReturnType transpose(typename internal::enable_if::value, Dummy*>::type = nullptr) { - EIGEN_STATIC_ASSERT_LVALUE(MatrixType) typename MatrixType::TransposeReturnType tmp(m_matrix); return TransposeReturnType(tmp); }