From 90b4839af82e9c0188f4d37c0587e613756abcf9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 27 Feb 2023 19:37:05 +0000 Subject: operator*= can work on any iterable collection --- lib/collections.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/collections.hpp') diff --git a/lib/collections.hpp b/lib/collections.hpp index 391647e..16870be 100644 --- a/lib/collections.hpp +++ b/lib/collections.hpp @@ -55,9 +55,8 @@ operator*(const std::array & in, auto && f) return out; } -template constexpr auto & -operator*=(std::span & in, auto && f) +operator*=(IterableCollection auto & in, auto && f) { for (auto & v : in) { f(v); -- cgit v1.2.3