|
Boost : |
Subject: Re: [boost] Answers re BENUM library for automated enum streaming
From: David Abrahams (dave_at_[hidden])
Date: 2008-09-16 13:26:35
on Tue Sep 16 2008, Tony D <tony_in_da_uk-AT-yahoo.co.uk> wrote:
> From: David Abrahams <dave_at_[hidden]>
>> [I/Tony wrote]:
>> > BENUM(X, A = 1, B, C = 22, D = B|N);
>>
>> This interface requires variadic (C99) preprocessor support, does it
> not?
>
>
> Quite so David. So, limited portability - unless your preprocessor library has
> some relevant workarounds?
I don't have a preprocessor library. For C98 compatibility
Boost.Preprocessor would probably support
BENUM(X, (A = 1)(B)(C = 22)(D = B|N));
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk