[PATCH] D33919: [ADT] Enforce class type for overridden SmallVector assign
Francis Ricci via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 16:21:44 PDT 2017
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 --------------
A non-text attachment was scrubbed...
Name: D33919.101474.patch
Type: text/x-patch
Size: 471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170605/851d72bf/attachment.bin>
More information about the llvm-commits
mailing list