Boost logo

Boost :

Subject: Re: [boost] Alternative implementation for BOOST_PP_VARIADIC_SIZE
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2011-11-14 18:11:05


Paul Mensonides <pmenso57 <at> comcast.net> writes:
> > So, all the theoretical corner cases aside FOO() should be invocation
> > with zero arguments and FOO(a) with one.
>
> Sorry, no. The language (preprocessor) forces the distinction between
> nullary and unary at the point of definition of the macro. This is not

We are going in circles. I am not telling you how to define BOOST_PP interfaces
or how we should treat A() *in general* or that there aren't any use case where
A's author wants to treat it as uniry invocation with empty arguments and yet
IMO if I want to author macro A(...) and treat A() as invocation with zero
arguments I expect boost PP to help me separate this use case (from A(a)). If it
is not the case we might as well start a separate set of macros which does that,
cause it is still going to be more important/popular than the other semantic.

Regards,
Gennadiy


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