Boost logo

Boost :

Subject: Re: [boost] [preprocessor] Warning: Incoming
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2011-06-30 21:31:22

On Wed, Jun 29, 2011 at 10:54 AM, Edward Diener <eldiener_at_[hidden]> wrote:
> Nonetheless macros using variadics to identify pp-lib data types on the fly
> might still be useful and I have already come up with a pretty good
> IS_TUPLE. Whether an IS_ARRAY, IS_LIST, or IS_SEQ is posible I shall see.

Useful indeed. I have implemented some sort of IS_TUPLE within
Boost.Local. BOOST_LOCAL_PARAMS() uses it to accept both the follow
syntaxes when variadics are present:

BOOST_LOCAL_PARAMS(int x, int& y) // (1)
BOOST_LOCAL_PARAMS( (int x) (int& y) ) // (2)

Essentially (going by memory):


#define BOOST_LOCAL_PARAMS(...) \
        BOOST_LOCAL_PARAMS_TUPLE_ /* for (1) */ \
    , \
        BOOST_LOCAL_PARAMS_SEQ_ /* for (2) */ \

#else // variadics

#define BOOST_LOCAL_PARAMS(seq) BOOST_LOCAL_PARAMS_SEQ_(seq) // only (2) :(

#endif // variadics

> I will probably end up putting any additions in my VMD library for the time
> being and if Paul decides that he wants them for pp-lib sometime in the
> future they will eventually go there.

I'd prefer to see IS_TUPLE (and possibly all IS_XXX) as part of these
Boost.Preprocess variadics changes.


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