http://llvm.org/bugs/show_bug.cgi?id=6548
Summary: DenseSet::iterator doesn't have std iterator traits
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Core LLVM classes
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
DenseMap has difference_type, iterator_category, etc, but DenseSet doesn't.
This prevents using set iterators with calls, such as insert, on std
containers.
Something like the below fixes this (any chance this can be fixed for 2.7?):
--- include/llvm/ADT/DenseSet.h (revision 97942)
+++ include/llvm/ADT/DenseSet.h (working copy)
@@ -55,6 +55,13 @@
class Iterator {
typename MapTy::iterator I;
public:
+ typedef typename MapTy::iterator::difference_type difference_type;
+ typedef ValueT value_type;
+ typedef value_type *pointer;
+ typedef value_type &reference;
+ typedef std::forward_iterator_tag iterator_category;
+
+
Iterator(const typename MapTy::iterator &i) : I(i) {}
ValueT& operator*() { return I->first; }
--
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