Boost logo

Boost :

Subject: Re: [boost] [range] [general] making member functionsSFINAE-friendly
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2013-02-18 19:12:38


> c) shouldn't there be:
>
> template<ForwardIteratorRange>
> class forward_iterator_range {
> ...
> };
>
> ...
>
> template<RandomIteratorRange>
> class random_access_iterator_range : public {
> size_type size() const;
> };
>
> ...
>
> Wouldn't restructuring interator_range along the lines of the above resolve
> all the confusion here?
>
> Robert Ramey

It would solve Jonathan's problem, sure.

But it would also hurt people who are trying to use
iterator_range to package a pair of arbitrary iterators
in generic code (which IMO is one of iterator_range's
major use cases), because they would now have to use
different classes for different types of iterators.

Regards,
Nate
                                               


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk