|
Boost : |
Subject: Re: [boost] BOOST_PP array extension proposal
From: Edward Diener (eldiener_at_[hidden])
Date: 2015-09-11 20:43:04
On 9/11/2015 7:22 PM, Matt Calabrese wrote:
> On Fri, Sep 11, 2015 at 4:13 PM, Edward Diener <eldiener_at_[hidden]>
> wrote:
>>
>> VMD is the place for this functionality since Boost PP does not have to
>> support variadic macros to still work, and testing for emptiness without
>> using variadic macros is too flawed to use IMO.
>
>
> Agreed.
>
> I assume the answer is "yes,"
The answer to what ?
> but are there compilers still in use that we
> need to worry about and that don't support variadic macros? It's my
> understanding that most (all?) of the widely-used compilers had
> preprocessors that supported variadic macros even before C++ technically
> had them in the language (probably thanks to C99), or are some
> implementations broken in a way that it makes sense to simply declare that
> they don't support variadics? Are there any plans to eventually just remove
> the check and assume variadic support?
Boost PP's tests for variadic macro support were written by Paul and
were done so that Boost PP does not rely on anything else. I've really
wanted to change it so that at least gcc is always marked as supporting
variadic macros, which it has actually done since gcc 3+ AFAIK, but the
difficulty of separating gcc from other compilers which mimic gcc and
define __GNUC__ has kept me from doing so.
For everything else I didn't intend to just assume variadic support
since the user can do so by a simple definition of BOOST_PP_VARIADICS=1.
I do agree that probably nearly every current version of a compiler
supports variadic macros, even if c++11 mode and up is not defined
during compilation, but who knows what earlier versions of some
compilers people are still using with Boost PP ( and/or VMD when it
comes out in the next Boost release ) so I would rather not just remove
the check and assume variadic macro support. I do understand that just
assuming variadic macro support makes writing macros much easier. This
is what I have done with VMD. Any suggestions/implementations of new
useful macros for VMD, which always assumes variadic macro support, are
always welcome.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk