On 11-06-2015 17:06, Anton Bachin wrote:
Thanks for the reply :)
On Jun 11, 2015, at 09:46, Thorsten Ottosen
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