http://llvm.org/bugs/show_bug.cgi?id=2363
Summary: DenseMap won't work with const key, integer value
Product: new-bugs
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [email protected]
DenseMap<const Ptr *, int> doesn't work for two reasons:
1) On line 221, the placement new fails because the argument is const.
2) DenseMap<int>::isPod is undefined.
For the former, I'm not sure what to do. For the latter, well, you can't define
DenseMapInfo<int> because there are no available integer sentinel values for
getEmptyKey() - you can't assume -1 is an invalid key. Probably the correct
thing to do is to define a separate type traits class for just those traits
needed by values (not keys). (Or define a whole type traits system, which might
not be a bad idea, it would clean up the current container implementations
quite a bit.)
--
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