Boost logo

Boost :

Subject: Re: [boost] Alternative implementation for BOOST_PP_VARIADIC_SIZE
From: Jens Gustedt (jens.gustedt_at_[hidden])
Date: 2011-11-14 14:21:22


Gennadiy Rozental <rogeeff <at> gmail.com> writes:

> Edward Diener <eldiener <at> tropicsoft.com> writes:
> > > https://gustedt.wordpress.com/2010/06/08/detect-empty-macro-arguments/ ),
> >
> > No, this does not workaround the well-known problem when the variadic
> > macro data is a function-like macro. See my comment at the link above.
>
> I cannot find it. Do you mean on a Jens page? Can you summarize it here?
>
> Gennadiy

It had been stuck in the moderation queue, sorry for that.

He basically says that the ISEMPTY macro there would not work with
function like macros as an argument, something like

#define AMACRO(x) ()
ISEMPTY(AMACRO)

would give 1.

I could not reproduce his assertion, for me this produces 0 on all
compilers that I tested. This macro is heavily used in P99 and I don't
see how this could return 1 for a preprocessor that is conforming to
C99. (P99 is for C99 and not C++)

Jens


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