Boost logo

Boost :

Subject: Re: [boost] [Preprocessor] Adding variadic macros support
From: Edward Diener (eldiener_at_[hidden])
Date: 2010-11-24 09:14:59

On 11/24/2010 8:42 AM, Mathias Gaunard wrote:
> On 24/11/2010 13:55, Edward Diener wrote:
>> On 11/24/2010 3:22 AM, Mathias Gaunard wrote:
>>> Variadic macros would allow to support tuples better in Boost.PP, as it
>>> would not be necessary to specify the size of the tuple, and it could be
>>> possible to provide other nice features around tuples.
>>> Other possible applications could be to accept the sequence (a)(b, c,
>>> d)(e) as being the same as (a)((b, c, d))(e).
>>> If you think other things could be improved in PP with variadic macros,
>>> feel free to point out where.
>>> The question is: how should it be done?
>>> Should the new macros be named, say, BOOST_PPV_*? Should the macros in
>>> BOOST_PP_* be "overloaded" on arity (a possibility with variadic macros)
>>> so as to exhibit both the old and new interface?
>> Please see my variadic_macro_data library in the sandbox. I have already
>> addressed the problem of uniting variadic macros with Boost PP there as
>> well as providing the support for tuples which you suggest in your
>> opening paragraph above.
> So why hasn't there even been talk to get this reviewed or integrated
> into Boost.PP?

I have no idea. I do not think it is up to a library developer to
constantly endeavor to promote his work, other than to do as excellent a
development as he can. Dave Abrahams noticed it but no one else reacted
to my original announcement. I too would love to see this library added
to Boost but I do not think it can be added directly into Boost PP but
rather exist as a separate Boost library. Paul Mensonides, the creator
of Boost PP, in e-mails to me expressed the fact that he really did not
want to add anything else directly into Boost PP since it was a fragile
enough implementation given that it has to workaround bugs in many C++
implementations of the preprocessor, especially VC++. He also is working
now on his own preprocessor library which needs a far more compliant C++
preprocessor than most compilers currently have. So I believe it would
be best to add my library as a separate library to Boost.

I can of course change the macro names in my library, as my
documentation suggests, to be closer to Boost, perhaps simply by adding
BOOST_ to the beginning of the macro names.

Please feel free to "talk up" my library so that others notice it and
want to add it to Boost, and have it reviewed. I am willing to do
whatever is necessary on my end to get this done. I will soon be adding
another library to the sandbox which can use variadic macros and uses my
variadic_macro_data library.

Questions, comments, suggestions etc. are all welcome regarding my library.

Boost list run by bdawes at, gregod at, cpdaniel at, john at