small_vector default constructor shouldn't be explicit v2017.08.14.00
authorNathan Bronson <ngbronson@fb.com>
Thu, 10 Aug 2017 19:35:20 +0000 (12:35 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 10 Aug 2017 19:36:50 +0000 (12:36 -0700)
Summary:
Containers should not tag their default constructor explicit,
because it means that you can't return an empty one with "return {};".
This diff removes the explicit tag from small_vector's default
constructor.

Reviewed By: meyering

Differential Revision: D5602749

fbshipit-source-id: 2a4a356134c69d01e3b040719dc6ffca0fe97e75

folly/small_vector.h

index f28f4dfbb1e5e0cdc289392b0bdf70815ab6c27e..64add098f65daddc0c16b81099028dee66f104ce 100644 (file)
@@ -401,7 +401,7 @@ class small_vector
   typedef std::reverse_iterator<iterator>       reverse_iterator;
   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
-  explicit small_vector() = default;
+  small_vector() = default;
 
   small_vector(small_vector const& o) {
     auto n = o.size();