Commit 7f413ec3 authored by James Sedgwick's avatar James Sedgwick Committed by Praveen Kumar Ramakrishnan

fix return type for map

Summary:
facepalm

Test Plan: unit

Reviewed By: hans@fb.com

Subscribers: folly-diffs@, jsedgwick, yfeldblum, chalfant

FB internal diff: D2036523

Tasks: 6925951

Signature: t1:2036523:1430423049:b69ace0256eeacdd43490465dc1c862f054a0098
parent 026ec6b1
...@@ -58,7 +58,8 @@ namespace futures { ...@@ -58,7 +58,8 @@ namespace futures {
*/ */
template <class It, class F, template <class It, class F,
class ItT = typename std::iterator_traits<It>::value_type, class ItT = typename std::iterator_traits<It>::value_type,
class Result = decltype(std::declval<ItT>().then(std::declval<F>()))> class Result
= typename decltype(std::declval<ItT>().then(std::declval<F>()))::value_type>
std::vector<Future<Result>> map(It first, It last, F func); std::vector<Future<Result>> map(It first, It last, F func);
// Sugar for the most common case // Sugar for the most common case
......
...@@ -1765,7 +1765,7 @@ TEST(Map, Basic) { ...@@ -1765,7 +1765,7 @@ TEST(Map, Basic) {
fs.push_back(p3.getFuture()); fs.push_back(p3.getFuture());
int c = 0; int c = 0;
auto fs2 = futures::map(fs, [&](int i){ std::vector<Future<void>> fs2 = futures::map(fs, [&](int i){
c += i; c += i;
}); });
......
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