[llvm] r207069 - [ADT] Add a generic iterator utility for adapting iterators much like
chandlerc at gmail.com
Thu Apr 24 13:24:43 PDT 2014
On Thu, Apr 24, 2014 at 1:16 PM, David Blaikie <dblaikie at gmail.com> wrote:
> > +/// \brief An iterator type that allows iterating over the pointees via
> > +/// other iterator.
> > +///
> > +/// The typical usage of this is to expose a type that iterates over
> Ts, but
> > +/// which is implemented with some iterator over T*s:
> > +///
> > +/// \code
> > +/// typedef pointee_iterator<SmallVectorImpl<T *>::iterator> iterator;
> > +/// \endcode
> > +template <
> > + typename WrappedIteratorT,
> > + typename T = typename std::remove_pointer<
> > + typename
> Just as a strawman, how do you feel about:
> template <typename WrappedIteratorT, typename T =
> I /think/ your version doesn't work for smart pointers, does it?
> (judging by http://en.cppreference.com/w/cpp/types/remove_pointer )
> and this version should.
Entertainingly, I almost used the version you posted prior to getting
std::remove_pointer to work.
I feel strongly that pointee_iterator should work with smart pointers, and
I'm somewhat bummed that std::remove_pointer doesn't work.
How about a slight variation: T =
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits