
30 Jun
2011
30 Jun
'11
4:32 a.m.
What you are looking for is a reversing adaptor, hence you probably should look at boost::adaptors::reversed, please see http://www.boost.org/doc/libs/1_46_1/libs/range/doc/html/range/reference/ada....
No, the reversing adaptor doesn't work either. Remember I want to specify *at compile time* whether or not to reverse the range.
If hypothetically there was a "null" range adapter, I could do something like:
typedef boost::mpl::if_
::type adaptor; boost::copy( adaptor(range) , ...);
But that doesn't seem to exist either.
The Pstade Oven library (a Boost.Range extension library) has an "identity" adaptor: http://p-stade.sourceforge.net/oven/doc/html/oven/range_adaptors.html#oven.r... This library may one day become part of Boost.Range. Nate.