|
Boost : |
Subject: Re: [boost] [Better Enums] More complete release - feedback requested
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2015-06-15 06:52:38
On 11-06-2015 17:06, Anton Bachin wrote:
> Thanks for the reply :)
>
>> On Jun 11, 2015, at 09:46, Thorsten Ottosen <tottosen_at_[hidden]> wrote:
>> It's more generic if you want to view the class as a container with size() and begin()/end().
>
> Better Enums is not the container, however. Itâs a class that provides access to
> two containers, currently through _names() and _values(). Those containers do
> have size() (a function), and begin()/end():
Well, as I said, I think it makes sense to view it as a special type of map.
> const int size = 3;
> char *descriptions[size];
>
> int size() { return 3; }
> char *descriptions[size()];
>
> I may be somehow wrong with this usage example. If so, please correct me.
If that is an important use-case, then I suggest that we provide both
size() and enum_size constant.
regards
Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk