Boost logo

Boost :

Subject: Re: [boost] [preprocessor] [config] Support for variadic macros
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-08-06 08:48:02

Zitat von Wolf Lammen <ookami1_at_[hidden]>:

>> someone there has submitted a workaround for this bug. I've tried it,
>> it looks sufficient to implement macros like BOOST_PP_TUPLE_*, but
>> variadic, without the "size" parameter for MSVC (and C99/C++0x)
> Hi,
> Variadic macros are part of the C99 standard. Judging from the
> preprocessor sources, their developers Mr Mensonides (and perhaps Mr
> Karvonen) seem to have painfully avoided breaking any rule of the
> C90 standard. For example, there are never empty macro arguments
> passed, although this would have simplified code in several instances.
> So, using variadic macros will break downward compatibility.

I'm not sure I understand what you are saying.
I wasn't suggesting to use variadic macros in BOOST_PP_TUPLE_*, I
meant new macros _like_ BOOST_PP_TUPLE_*.
there are only 6 or so TUPLE macros, and their predominant use is
probably: converting a tuple to a sequence.
that would effectively introducde a new "data type" to the PP library:
a variadic tuple.

I'm sure I'm not the first to suggest this, but with the workaround
submitted to that microsoft site MSVC can be supported (along with all
compilers implementing (conforming) C99 variadic macros)

> If you think it is time to leave C90 behind, it might be worth

no I don't.

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