|
Boost : |
Subject: Re: [boost] Scoped Enum Emulation
From: Beman Dawes (bdawes_at_[hidden])
Date: 2012-01-24 16:51:11
On Tue, Jan 24, 2012 at 12:06 PM, Joshua Boyce
<raptorfactor_at_[hidden]> wrote:
> I'm currently updating some of my code to take advantage of C++0x features
> where available, but I also want to retain backwards compatibility with
> C++03. I was looking at scoped enums and noticed a thread on the mailing
> list by Beman Dawes discussing a scoped enum emulation implementation for
> Boost. I see that it's currently being used by Boost, and resides in
> /boost/detail/scoped_enum_emulation.hpp.
>
> My question is, why is this an implementation detail? Would it be possible
> for it to be moved to Boost.Config with the other 'helper' macros
> like BOOST_CONSTEXPR?
>
> Obviously it's not hard to reimplement, but I figured that it would be
> useful to other library users, so it would be best (imo) if it were moved
> somewhere public, rather than being hidden away.
It isn't a full emulation of C++11's scoped enum feature. That's
probably why it ended up in detail rather than config, although I've
forgotten the detailed rationale, if there ever was any.
What do others think? Should /boost/detail/scoped_enum_emulation.hpp
functionality be moved to config?
Are there any improvements that would make the emulation better,
without turning something simple into something complex?
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk