Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range] Select forward or reverse traversal at compile time?
From: Alastair Rankine (arsptr_at_[hidden])
Date: 2011-06-30 23:45:52

On 01/07/11 08:02, Neil Groves wrote:
> Not only does the reverse adaptor work it can easily address your stated
> problem.Like this:

Well technically the reverse_range type does solve the problem, the
reverse adaptor doesn't.

But yes I can confirm that your conditional_reverse does prettymuch
exactly what I want.

> Note that you could also use the reversed_range class directly.
> It is implemented in a detail namespace, but is brought into the boost
> namespace. This changed from the first versions of Boost.Range with
> adaptors. By popular demand the return types of the adaptors are now all
> public documented types.

My mistake, I see that reverse_range is a public type.

However I would suggest that the documentation is less than entirely
clear on this class. As far as I can tell, reverse_range is only
mentioned in the documentation as a return type of the reversed range
adaptor, and there is no other information about it.

Furthermore I think you have shown that reverse_range has utility in its
own right, and hence should be implemented in a separate header from the
reversed range adaptor?

Thanks for your help.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at