Boost logo

Boost :

Subject: Re: [boost] [C++0x] Emulation of scoped enums
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-03-06 13:08:47

Beman Dawes wrote:
> The improved type safety of the C++0x scoped enum feature is attractive,
> so I'd like to start using it as it becomes available in compilers.
> See
> for a description. Note that the committee changed the name from
> strongly typed enums to scoped enums.
> See the attached for a boost/detail header that provides macro wrappers
> that use scoped enums if available, otherwise fall back on C++03
> namespaces and unscoped enums. It lets a library write:

Could this be rewritten to use structs instead of namespaces? This would
allow to declare enums nested in classes.

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