vendredi 1 février 2019

How to fetch in C++ at compile time the number of elements in an enum? [duplicate]

This question already has an answer here:

Is there a way to fetch the number of elements in an enum in C++11 at compile time? In my case the enum is a ordered bitmask enum, meaning that first element is 0x0000, next element is 0x0001 and so on.

Aucun commentaire:

Enregistrer un commentaire