summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-02-27 19:37:05 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-02-27 19:37:05 +0000
commit90b4839af82e9c0188f4d37c0587e613756abcf9 (patch)
tree3d716f028bfe993eeb6f84187974d6e5328b6e0f /lib
parentAdd nodiscard to many collections helpers (diff)
downloadilt-90b4839af82e9c0188f4d37c0587e613756abcf9.tar.bz2
ilt-90b4839af82e9c0188f4d37c0587e613756abcf9.tar.xz
ilt-90b4839af82e9c0188f4d37c0587e613756abcf9.zip
operator*= can work on any iterable collection
Diffstat (limited to 'lib')
-rw-r--r--lib/collections.hpp3
1 files changed, 1 insertions, 2 deletions
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<T, N> & in, auto && f)
return out;
}
-template<typename T>
constexpr auto &
-operator*=(std::span<T> & in, auto && f)
+operator*=(IterableCollection auto & in, auto && f)
{
for (auto & v : in) {
f(v);