[llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h
Chris Lattner
clattner at apple.com
Fri Jun 29 08:55:00 PDT 2007
> 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.
Ok.
Should this be marked 'explicit'?
-Chris
>
> ---
> Diffs of the changes: (+1 -1)
>
> SmallVector.h | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
>
> Index: llvm/include/llvm/ADT/SmallVector.h
> diff -u llvm/include/llvm/ADT/SmallVector.h:1.30 llvm/include/llvm/
> ADT/SmallVector.h:1.31
> --- llvm/include/llvm/ADT/SmallVector.h:1.30 Thu May 17 15:01:40 2007
> +++ llvm/include/llvm/ADT/SmallVector.h Thu Jun 28 15:27:24 2007
> @@ -442,7 +442,7 @@
> 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--)
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list