Commit d2c954b7 authored by James Sedgwick's avatar James Sedgwick Committed by Alecs King

fix collect for non-default-constructible types

Summary: as above

Test Plan: compile

Reviewed By: agoder@fb.com

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

FB internal diff: D1999218

Signature: t1:1999218:1429217794:0278955bb471fe73a14ccedb59eae80b98acdbf3
parent 513a1e16
...@@ -586,9 +586,8 @@ namespace detail { ...@@ -586,9 +586,8 @@ namespace detail {
template <typename T> template <typename T>
struct CollectContext { struct CollectContext {
explicit CollectContext(int n) : count(0), threw(false) { explicit CollectContext(int n) : count(0), threw(false) {}
results.resize(n);
}
Promise<std::vector<T>> p; Promise<std::vector<T>> p;
std::vector<T> results; std::vector<T> results;
std::atomic<size_t> count; std::atomic<size_t> count;
......
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