search for: ilist_iterator_base

Displaying 2 results from an estimated 2 matches for "ilist_iterator_base".

2015 Oct 21
3
ilist/iplist are broken (maybe I'll fix them?)
...bly usually written as `auto I = N->getIterator()`, which looks pretty nice). > Note that after my ilist changes, this implicit conversion will look > basically like this: > -- > struct ilist_node_base { > ilist_node_base *Prev; > ilist_node_base *Next; > }; > struct ilist_iterator_base { > ilist_node_base *N; > }; > template <typename NodeTy> > class ilist_iterator : private ilist_iterator_base { > operator pointer() const { return static_cast<NodeTy *>(N); } > }; > -- > This kind of (implicit and potentially UB) downcast makes me uneasy. &...
2015 Oct 20
2
ilist/iplist are broken (maybe I'll fix them?)
I think the implicit iterator conversions are much less important now that we have range based for loops, but I still like having them. On Tue, Oct 20, 2015 at 11:13 AM, Duncan P. N. Exon Smith via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > > On 2015-Oct-07, at 17:57, Duncan P. N. Exon Smith <dexonsmith at apple.com> > wrote: > > > > I've been