http://llvm.org/bugs/show_bug.cgi?id=3947
Summary: SmallVector::insert overload ambiguous when T=int
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core LLVM classes
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=2793)
--> (http://llvm.org/bugs/attachment.cgi?id=2793)
Testcase demonstrating the issue
Two of the SmallVector::insert function overloads are ambiguous when T=int (or
something like size_type):
iterator insert(iterator I, size_type NumToInsert, const T &Elt)
and
template<typename ItTy>
iterator insert(iterator I, ItTy From, ItTy To)
SmallVector<int, X>::insert(..., 2, 2) results in G++ 4.3 picking the templated
overload (as ItTy=int) and ending up with a lot of errors.
Not sure how to fix this, other than untemplating the ItTy version. Note that
std::vector does not have this limitation.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs