From 38fc122b84fce3a0e6299069524e80a73818d928 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 10 Apr 2023 13:19:19 +0100 Subject: Constraint operator* collection helper to IterableCollections --- lib/collections.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/collections.hpp b/lib/collections.hpp index 59cec6f..4df622e 100644 --- a/lib/collections.hpp +++ b/lib/collections.hpp @@ -65,10 +65,11 @@ operator*=(IterableCollection auto & in, auto && f) } template typename C, typename... T> + requires IterableCollection> [[nodiscard]] constexpr auto operator*(const C & in, auto && f) { - C out; + C out; std::transform(in.begin(), in.end(), std::inserter(out, out.end()), f); return out; -- cgit v1.2.3