new small_vector tests that fail on trunk and uncover a bug in emplace_back on refere...
authorYoni Lavi <yonil@fb.com>
Sat, 20 Jun 2015 14:45:56 +0000 (07:45 -0700)
committerSara Golemon <sgolemon@fb.com>
Sun, 21 Jun 2015 18:58:58 +0000 (11:58 -0700)
commitbd51c8dbebd7ee9de3db64b8d84a814a00639e0a
tree24ea55d5a4cc909cd8f063e197cd8b66ee1b3cb3
parent6457c4429379011d12ee841e8325dddeebec538e
new small_vector tests that fail on trunk and uncover a bug in emplace_back on references to memory inside the vector + a fix + perf improvement to const lvalue push_back

Summary: emplace_back() on a small_vector applied on data inside the vector doesn't work properly.
In standard vectors, this usage is required to work properly, but I'm not sure whether it should in small_vector. Consider fixing / adding a lint rule.

Reviewed By: @yfeldblum

Differential Revision: D2122931
folly/small_vector.h
folly/test/small_vector_test.cpp