Using emplace_back to avoid temporary
[folly.git] / folly / test / sorted_vector_test.cpp
index 939a085df2ac77e97c48c437d9525fd95b95fc95..e1366787ab00a4df74b5a71d17259f47c8b9a51e 100644 (file)
@@ -280,7 +280,7 @@ TEST(SortedVectorTypes, GrowthPolicy) {
 
   std::list<CountCopyCtor> v;
   for (int i = 0; i < 20; ++i) {
-    v.push_back(CountCopyCtor(20 + i));
+    v.emplace_back(20 + i);
   }
   a.insert(v.begin(), v.end());
   check_invariant(a);