Boost logo

Boost :

Subject: Re: [boost] Add macros for the "enum class" concept?
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-12-12 09:09:56


Vicente Botet wrote
>
>
> Daryle Walker wrote
>>
>>> Date: Mon, 12 Dec 2011 12:55:33 +0000
>>> From: dnljms@
>>
>>> On 12 December 2011 12:46, Daryle Walker <darylew@> wrote:
>>> >
>>> > Should we add preprocessor stuff to conditionally use the C++11 "enum
>>> class" construct?
>>>
>>> We have something like that already:
>>>
>>> http://www.boost.org/boost/detail/scoped_enum_emulation.hpp
>>
>> Reading it, it doesn't have any base type and/or forward-declaration
>> facilities.
>>
>>
>
> How do you want to be able to use forward declaration in a portable way?
>
> There are also scoped enums with underlying type that are no enum class.
> These could be added as well.
>
>

How do you think we can use scoped enum with underlying types in a portable
way? I guess the use that states that an enum is a char expect the sizeof
this enum to be the same as the sizeof char, isn't it?

I have been working a little bit on a enums library that provides such a
feature (see
https://svn.boost.org/svn/boost/sandbox/enums/libs/enums/doc/html/index.html).
Let me know if you are interested.

Vicente

Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/Add-macros-for-the-enum-class-concept-tp4185837p4186092.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk