Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-08-11 20:31:51


AMDG

Robert Dailey wrote:
> Hi,
>
> Is it possible to do a reverse iteration? For example:
>
> # define BOOST_PP_ITERATION_LIMITS (5, 0)
>
> Looking at the preprocessor output from MSVC9, I'm seeing that it works
> properly. By properly, I mean I'm getting my "primary" template first, and
> then several specialized versions under that one. I'm using reverse
> iteration here so that I can create class specializations, while at the same
> time keeping my primary template at the "top", since it will be the first to
> be created. However, any code that tries to use a specialized version of my
> class does not compile. It says insufficient number of template parameters,
> which leads me to believe iteration limits does not expect start to be
> greater than finish.
>

Reverse iteration works properly. The problem is
most likely that you need a forward declaration with
default arguments:

template<class R BOOST_PP_ENUM_TRAILING_PARAMS_WITH_A_DEFAULT(i, class
T, detail::no_param)>
class InputSource;

In Christ,
Steven Watanabe


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