From: James Sedgwick Date: Fri, 17 Apr 2015 15:45:58 +0000 (-0700) Subject: fix collect for non-default-constructible types X-Git-Tag: v0.36.0~26 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d2c954b7c80b7c63880c3fde55028c169f553239;p=folly.git 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 --- diff --git a/folly/futures/Future-inl.h b/folly/futures/Future-inl.h index abcfcb86..7a2ffc2b 100644 --- a/folly/futures/Future-inl.h +++ b/folly/futures/Future-inl.h @@ -586,9 +586,8 @@ namespace detail { template struct CollectContext { - explicit CollectContext(int n) : count(0), threw(false) { - results.resize(n); - } + explicit CollectContext(int n) : count(0), threw(false) {} + Promise> p; std::vector results; std::atomic count;