Boost logo

Boost :

Subject: Re: [boost] [iterator][range] BoostIteratorTraversalConcepts-aware boost::advance/distance
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2017-07-02 22:53:06

On 30/06/2017 9:03, Andrzej Krzemienski via Boost wrote:

> So according to STL rules zip-iterator can only be an InputIterator, even
> though you have random-access capability. And in fact, zip-iterator has
> iterator_category tag of `std::input_iterator_tag`, but apart from that it
> provides a Boost "traversal category" tag, which just tell how you get to
> the next object in the colleciton and not about its reference type.

AFAIK Boost.Iterator can define iterator_category as something derived
from a standard tag, but that "something" could not be any of standard
tags, so I think it's non-conformant.

A container could check through SFINAE if the tag of an iterator is
exactly one of the standard provided ones. If Boost.Iterator defines
iterator_category to anything that is not exactly a standard tag it
won't be accepted by the container.



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