Boost logo

Boost :

Subject: Re: [boost] Scoped enum emulation
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2012-05-10 10:25:13

Beman Dawes wrote
> On Thu, May 10, 2012 at 3:04 AM, Anthony Williams <anthony.ajw@>
> wrote:
>> Hi,
>> On trunk there are currently two scoped enum emulation headers. One is
>> the one that Beman wrote, in boost/detail/scoped_enum_emulation.hpp and
>> the other is the one that Vicente has developed for the new version of
>> Boost.Thread, in boost/thread/detail/scoped_enum.hpp
>> It seems to me that it is a shame to have two implementations of the
>> same thing in boost. Since Vicente's version provides additional
>> facilities, I would therefore like to merge Vicente's code into the
>> boost/detail header. We could retain the simple macros from Beman's
>> header as wrappers for the more complex macros that Vicente has written.
>> What do you think?
> Fine with me, as long as it doesn't break any current usage.
> It was a mistake from the start to have two ways of doing the same thing,
> IMO.

What do you mean by "the start"?

Both emulations have advantages and liabilities, so I think that both could
be appropriated to a given context.

I'm not sure we can/should define the Beman's macros in function of my
macros (as we will lost the advantages).

I would say that either Boost decides for a single emulation or each author
uses the emulation s/he prefers (consider is more adapted to its context).

I prefer my emulation as closer to the C++11 semantics and in addition uses
the C++ constructions when available.


P.S. I've been preparing a Boost.Enums library that include scoped enums and
much more (see the sandbox

View this message in context:
Sent from the Boost - Dev mailing list archive at

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