small_vector should not require a copy-ctr from its element type unless it needs it.
authorDmitry Pleshkov <bort@fb.com>
Tue, 14 Mar 2017 06:33:57 +0000 (23:33 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 14 Mar 2017 06:39:18 +0000 (23:39 -0700)
commitacbd8f4fd827e188dfb4209e35998fbe7ce9162a
tree1ebb3cb015960bac88830dd3ac891351079d75c4
parentce56a16aab5a5f39246b26cb145e822a15436b5a
small_vector should not require a copy-ctr from its element type unless it needs it.

Summary:
Use default constructor directly, instead of copying the element introduced by default parameter value.
This behavior is compatible with `std::vector`.

Reviewed By: ot, bixue2010, luciang

Differential Revision: D4700611

fbshipit-source-id: d3bd82c46c2857f5abcbec5dd2a64aaa85eaefe4
folly/small_vector.h
folly/test/small_vector_test.cpp