Boost logo

Boost :

Subject: Re: [boost] [C++0x] Emulation of scoped enums
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2009-03-05 17:54:54

On Thu, Mar 5, 2009 at 7:11 PM, Beman Dawes <bdawes_at_[hidden]> wrote:
> On Thu, Mar 5, 2009 at 12:44 PM, Beman Dawes <bdawes_at_[hidden]> wrote:
>> On Thu, Mar 5, 2009 at 12:15 PM, Phil Endecott
>>> - How about avoiding the _START/_END stuff with e.g.
>>>  BOOST_SCOPED_ENUM_DECL(algae, green,red,cyan);
>>>  (I had been under the impression that varargs macros were a gcc-ism, but
>>> I've recently discovered that they're in c99; do non-gcc C++ compilers
>>> generally allow them?  I don't think we can get away with allowing only
>>> up-to-N elements in this case.)
>> Hum... I hadn't considered varargs macros. If I even knew they existed:-)
>> Let me try that on some non-gcc compilers. I'll report back.
> It looks like Microsoft 2005 and later and at least some others
> support varargs macros, so I'm investigating further.

I wouldn't. If you really want to use one macro only, I would use the
PP sequence

> --Beman

Felipe Magno de Almeida

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