diff options
author | Dan Gohman <gohman@apple.com> | 2007-06-28 20:27:24 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-06-28 20:27:24 +0000 |
commit | 8b42bcdd1ad6f3f908d062b189fbc2a6449fae83 (patch) | |
tree | 491c524148b4c11e39c643a931376d9ec335a4a7 /include/llvm | |
parent | 00d8a84b4432bedc3050f012454cbf6ef1b05461 (diff) | |
download | external_llvm-8b42bcdd1ad6f3f908d062b189fbc2a6449fae83.zip external_llvm-8b42bcdd1ad6f3f908d062b189fbc2a6449fae83.tar.gz external_llvm-8b42bcdd1ad6f3f908d062b189fbc2a6449fae83.tar.bz2 |
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
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/ADT/SmallVector.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 5fcb2b9..bb8cef4 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -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--) |