Boost logo

Boost :

Subject: Re: [boost] [type_traits] Interest in is_iterator type trait?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2014-08-19 13:07:28

On Tue, Aug 19, 2014 at 12:38 PM, Howard Hinnant <howard.hinnant_at_[hidden]>

> On Aug 19, 2014, at 11:55 AM, Peter Dimov <lists_at_[hidden]> wrote:
> > Beman Dawes wrote:
> >> The intent was always to submit is_iterator to Boost, but we never got
> around to it. Now I need it in Boost.Filesystem, so I'd rather see it go in
> type traits than just sticking it into boost/filesystem/detail.
> >
> > Out of curiosity, why do you need it?
> Fwiw, I used something closely related in libc++ for SFINAE on the “member
> template members” of the containers (the ones taking iterators) to
> disambiguate them from the members/constructors not taking iterators, but
> having the same number of parameters. But instead of is_iterator, I needed
> is_input_iterator, is_forward_iterator, etc. These refinements are
> implemented similar to what Beman shows, but takes into account which std
> iterator tag the nested iterator_category type is implicitly convertible to

Yeah, if we are going ahead with this, is_input_iterator and the rest of
the family should be included.


Boost list run by bdawes at, gregod at, cpdaniel at, john at