Subject: Re: [boost] Answers re BENUM library for automated enum streaming
From: Tony D (tony_in_da_uk_at_[hidden])
Date: 2008-09-16 19:03:35
From: David Abrahams <dave_at_[hidden]>
> > [Iony wrote]:
> > [BENUM does need variadic macros] 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));
Sorry - had it in my head that Boost.Preprocessor was one of yours... apologies to Vesa Karvonen and Paul Mensonides. Anyway, good to know some possibility exists, though half the appeal of BENUM was that the notation (sans markup) resembled normal enums, facilitating uptake and retrofitting, so not sure if it's worth complicating the implementation to have the notation above available on a proportion of compilers. Happy to hear any opinions, and will look into it if I have spare time (my introspective pre-processor project takes priority unless there's significant demand).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk