Add a default parameter to a SmallVector constructor to allow it to

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
This commit is contained in:
Dan Gohman 2007-06-28 20:27:24 +00:00
parent 00d8a84b44
commit 8b42bcdd1a

View 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--)