
----- Original Message ----- From: "Matt Calabrese" <rivorus@gmail.com> To: <boost@lists.boost.org> Sent: Friday, March 06, 2009 1:26 AM Subject: Re: [boost] [C++0x] Emulation of scoped enums
I wouldn't. If you really want to use one macro only, I would use the PP sequence instead.
I'm gonna be the rebel and say that I think how it's currently implemented is [unfortunately] the most functional and most portable option, though I guess there is no harm in supplying a couple of interfaces as long as it doesn't make things too confusing for users. The problem with using a PP sequence is that you are going to hit a hard limit of 256 elements, meaning you have to at least support the current interface as an option otherwise you rule out using the macro for enums with a large number of constants. This also makes things frustrating for users if their enum starts below 256 in size and then over time approaches the limit. That means they would then have to go back and switch from using preprocessor sequences to the original style interface (or use a version of Boost.Preprocessor with higher limits). As for using variadic macros, you need either a compiler that supports them as an extension for C++, or an 0x compiler. While I agree that the current interface is kind of ugly, I still think it's the best option available.
I agree, The _START _END version has a little inconvenient, but a lot of advanteges. Vicente