From 2043667afaa63d5575564e75fc0908157941caee Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Wed, 15 May 2024 17:15:41 -0700 Subject: [PATCH] Refactor MatrixLike concept (#536) --- include/sleipnir/util/Concepts.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/sleipnir/util/Concepts.hpp b/include/sleipnir/util/Concepts.hpp index 3f4f7252..653200e7 100644 --- a/include/sleipnir/util/Concepts.hpp +++ b/include/sleipnir/util/Concepts.hpp @@ -15,6 +15,10 @@ template concept ScalarLike = std::same_as || std::same_as || std::same_as; +template +concept SleipnirMatrixLike = std::same_as || + std::same_as>; + template concept EigenMatrixLike = std::derived_from>; @@ -23,8 +27,6 @@ template concept EigenSolver = requires(T t) { t.solve(Eigen::VectorXd{}); }; template -concept MatrixLike = - std::same_as || - std::same_as> || EigenMatrixLike; +concept MatrixLike = SleipnirMatrixLike || EigenMatrixLike; } // namespace sleipnir