summaryrefslogtreecommitdiff
path: root/lib/collections.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/collections.hpp')
-rw-r--r--lib/collections.hpp3
1 files changed, 2 insertions, 1 deletions
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<template<typename...> typename C, typename... T>
+ requires IterableCollection<C<T...>>
[[nodiscard]] constexpr auto
operator*(const C<T...> & in, auto && f)
{
- C<decltype(f(in[0]))> out;
+ C<decltype(f(*in.begin()))> out;
std::transform(in.begin(), in.end(), std::inserter(out, out.end()), f);
return out;