diff --git a/folly/futures/helpers.h b/folly/futures/helpers.h index 7fd7950..c39d668 100644 --- a/folly/futures/helpers.h +++ b/folly/futures/helpers.h @@ -58,7 +58,8 @@ namespace futures { */ template ::value_type, - class Result = decltype(std::declval().then(std::declval()))> + class Result + = typename decltype(std::declval().then(std::declval()))::value_type> std::vector> map(It first, It last, F func); // Sugar for the most common case diff --git a/folly/futures/test/FutureTest.cpp b/folly/futures/test/FutureTest.cpp index da3e1c5..5b7be30 100644 --- a/folly/futures/test/FutureTest.cpp +++ b/folly/futures/test/FutureTest.cpp @@ -1765,7 +1765,7 @@ TEST(Map, Basic) { fs.push_back(p3.getFuture()); int c = 0; - auto fs2 = futures::map(fs, [&](int i){ + std::vector> fs2 = futures::map(fs, [&](int i){ c += i; });