Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range] Select forward or reverse traversal at compile time?
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2011-06-30 00:32:26

> > What you are looking for is a reversing adaptor, hence you probably
> > should look at boost::adaptors::reversed, please see
> >
> 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_<Reversed,
> boost::adaptors::reversed,
> boost::adaptors::null>::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"
This library may one day become part of Boost.Range.

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