[LLVMbugs] [Bug 3947] New: SmallVector::insert overload ambiguous when T=int
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Apr 5 15:22:48 PDT 2009
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: unassignedbugs at nondot.org
ReportedBy: johnson.peter at gmail.com
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list