Commit a8990a74 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Refactor non-variadic collect variants

Summary:
[Folly] Refactor non-variadic `collect` variants.

No change in behavior - just moving code around.

Reviewed By: marshallcline

Differential Revision: D8440630

fbshipit-source-id: a6349c73c2109237f1be174c2260e9c9eb2d1c0e
parent 698d1e78
This diff is collapsed.
......@@ -72,7 +72,6 @@ namespace futures {
namespace detail {
template <class> class Core;
template <class> struct CollectContext;
template <typename...>
struct ArgType;
......
......@@ -307,8 +307,8 @@ Future<std::tuple<Try<typename remove_cvref_t<Fs>::value_type>...>> collectAll(
/// type of the returned Future is std::vector<T> instead of
/// std::vector<Try<T>>
template <class InputIterator>
Future<typename futures::detail::CollectContext<typename std::iterator_traits<
InputIterator>::value_type::value_type>::result_type>
Future<std::vector<
typename std::iterator_traits<InputIterator>::value_type::value_type>>
collect(InputIterator first, InputIterator last);
/// Sugar for the most common case
......@@ -435,12 +435,7 @@ auto reduce(Collection&& c, T&& initial, F&& func)
/** like reduce, but calls func on finished futures as they complete
does NOT keep the order of the input
*/
template <
class It,
class T,
class F,
class ItT = typename std::iterator_traits<It>::value_type::value_type,
class Arg = MaybeTryArg<F, T, ItT>>
template <class It, class T, class F>
Future<T> unorderedReduce(It first, It last, T initial, F func);
/// Sugar for the most common case
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment