Add a default parameter to a SmallVector constructor to allow it to
authorDan Gohman <gohman@apple.com>
Thu, 28 Jun 2007 20:27:24 +0000 (20:27 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 28 Jun 2007 20:27:24 +0000 (20:27 +0000)
be called with just an initial length value, just like in std::vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37779 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/SmallVector.h

index 5fcb2b93065b513e94fdc9b8d28b3f9be2f9ca2e..bb8cef4ce8a3c86ec505a25bf7950a3afcbd7dc3 100644 (file)
@@ -442,7 +442,7 @@ public:
   SmallVector() : SmallVectorImpl<T>(NumTsAvailable) {
   }
   
-  SmallVector(unsigned Size, const T &Value)
+  SmallVector(unsigned Size, const T &Value = T())
     : SmallVectorImpl<T>(NumTsAvailable) {
     this->reserve(Size);
     while (Size--)