[PATCH] D33919: [ADT] Enforce class type for overridden SmallVector assign
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 16:34:32 PDT 2017
How would this change fix that? Am I missing something? (the class and
typename keyword in the template arg list are semantically identical)
What Eli said.
On Mon, Jun 5, 2017 at 4:21 PM Francis Ricci via Phabricator <
reviews at reviews.llvm.org> wrote:
> fjricci created this revision.
>
> This prevents the iterator override of assign from being selected in
> the case where two unsigned integers are used as arguments,
> which is a case that should be covered by `assign(size_type, const T &)`
> instead.
>
>
> https://reviews.llvm.org/D33919
>
> Files:
> include/llvm/ADT/SmallVector.h
>
>
> Index: include/llvm/ADT/SmallVector.h
> ===================================================================
> --- include/llvm/ADT/SmallVector.h
> +++ include/llvm/ADT/SmallVector.h
> @@ -426,7 +426,7 @@
> std::uninitialized_fill(this->begin(), this->end(), Elt);
> }
>
> - template <typename in_iter> void assign(in_iter in_start, in_iter
> in_end) {
> + template <class in_iter> void assign(in_iter in_start, in_iter in_end) {
> clear();
> append(in_start, in_end);
> }
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170605/05c3206b/attachment-0001.html>
More information about the llvm-commits
mailing list