Boost logo

Boost Users :

Subject: Re: [Boost-users] [Preprocessor] ternary identity macro
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2012-04-24 07:47:26


2012/4/24 Sebastian Pfützner <s.pfuetzner_at_[hidden]>

> Hello,
>
> I often write something like
>
> #define TEXT(z, n, data) data
> BOOST_PP_ENUM(5, TEXT, xxx)
>
> in my code to create a comma separated list of words. Is there already a
> macro
> like TEXT in boost? Or is there a even better way to do what I want?

There is BOOST_PP_ENUM_PARAMS.

    BOOST_PP_ENUM_PARAMS(5, xxx)

Roman Perepelitsa.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net