
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? Anthony -- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++11 thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

On Thu, May 10, 2012 at 3:04 AM, Anthony Williams <anthony.ajw@gmail.com> 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. --Beman

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. Best, Vicente P.S. I've been preparing a Boost.Enums library that include scoped enums and much more (see the sandbox https://svn.boost.org/svn/boost/sandbox/enums/libs/enums/doc/html/index.html) -- View this message in context: http://boost.2283326.n4.nabble.com/Scoped-enum-emulation-tp4622675p4623654.h... Sent from the Boost - Dev mailing list archive at Nabble.com.
participants (3)
-
Anthony Williams
-
Beman Dawes
-
Vicente Botet