From 1df19efd78b5f61b89b953d133baf1a5ccf963dd Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 4 Mar 2025 20:27:12 +0000 Subject: Constrain operator* for array*functor Stops it being a broken candidate for array*array --- lib/collections.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/collections.h b/lib/collections.h index 27eff0a..b921424 100644 --- a/lib/collections.h +++ b/lib/collections.h @@ -45,6 +45,7 @@ operator*(const std::array & a, const std::array & b) template [[nodiscard]] constexpr auto operator*(const std::array & in, auto && f) + requires requires { f(in.front()); } { std::array out; -- cgit v1.2.3