projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
513a1e1
)
fix collect for non-default-constructible types
author
James Sedgwick
<jsedgwick@fb.com>
Fri, 17 Apr 2015 15:45:58 +0000
(08:45 -0700)
committer
Alecs King
<int@fb.com>
Mon, 27 Apr 2015 23:45:15 +0000
(16:45 -0700)
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
folly/futures/Future-inl.h
patch
|
blob
|
history
diff --git
a/folly/futures/Future-inl.h
b/folly/futures/Future-inl.h
index abcfcb86583606c4664c66825d7782a7abaa663d..7a2ffc2b3263351118babc339109faff788af01a 100644
(file)
--- a/
folly/futures/Future-inl.h
+++ b/
folly/futures/Future-inl.h
@@
-586,9
+586,8
@@
namespace detail {
template <typename T>
struct CollectContext {
- explicit CollectContext(int n) : count(0), threw(false) {
- results.resize(n);
- }
+ explicit CollectContext(int n) : count(0), threw(false) {}
+
Promise<std::vector<T>> p;
std::vector<T> results;
std::atomic<size_t> count;