Add default R template param to Map

This commit is contained in:
sha512sum 2024-03-26 09:10:03 +00:00
parent 9cb0811ecc
commit 2c327741b1

View file

@ -169,7 +169,7 @@ inline constexpr auto Transform(Tuple&& container, F&& f, TypeList<R> = {}) {
}(std::make_index_sequence<kTupleSize<Tuple>>()); }(std::make_index_sequence<kTupleSize<Tuple>>());
}; };
template <TupleLike Tuple, typename R, typename F> template <TupleLike Tuple, typename R = Tuple, typename F>
inline constexpr auto Map(Tuple&& tuple, F&& f, TypeList<R> result = {}) { inline constexpr auto Map(Tuple&& tuple, F&& f, TypeList<R> result = {}) {
return Transform(std::forward<Tuple>(tuple), std::forward<F>(f), result); return Transform(std::forward<Tuple>(tuple), std::forward<F>(f), result);
}; };