Boost logo

Boost Users :

Subject: Re: [Boost-users] Why is size param required for BOOST_PP_TUPLE_TO_LIST(size, tuple) ?
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2009-08-06 10:50:25


2009/8/6 Mathieu Malaterre <mathieu.malaterre_at_[hidden]>

> Hi there,
>
> I am looking at:
>
>
> http://www.boost.org/doc/libs/1_39_0/libs/preprocessor/doc/ref/tuple_to_list.html
>
> Just ouf of curiosity why is size required ? Can't the number of
> argument be deduced using the preprocessor ? Eg.:
>
>
> http://groups.google.com/group/comp.std.c/browse_thread/thread/77ee8c8f92e4a3fb/346fc464319b1ee5
>

Boost PP uses C++ preprocessor. Variadic macros are not part of it, but they
are part of C99 and many C++ compilers support it. AFAIK there is no way to
get size of a tuple without variadic macros.

Roman Perepelitsa.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net