Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2008-03-10 19:03:51


On 03/10/08 14:41, Eric Niebler wrote:
[snip]
>
> If you want to play with the variadic Proto code, you can find it at
> branches/proto/v3. I recently resurrected this branch because some
> people on the std committee were interested in it. It's not production
> code, though.
>
The args.hpp code here:

http://svn.boost.org/trac/boost/browser/branches/proto/v3/boost/xpressive/proto/args.hpp

around line 61 contains:

         #define BOOST_PP_ITERATION_PARAMS_1 (3, (1,
BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/args.hpp>))
58 #include BOOST_PP_ITERATE()
59
60 #ifdef BOOST_HAS_VARIADIC_TMPL
61 template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_ARITY,
typename A), typename... Args>
62 struct args< BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_ARITY,
A), Args... >
63 {
64 BOOST_STATIC_CONSTANT(long, size =
BOOST_PROTO_MAX_ARITY + sizeof...(Args));
65

I don't understand why BOOST_PP_ENUM_PARMS is used in the same statement
as Args.... AFAICT, the BOOST_PP_ENUM_PARMS should be used when #undef
BOOST_HAS_VARIADIC_TMPL and the Args... when #define
BOOST_HAS_VARIADIC_TMPL.

Am I missing something?


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