lundi 30 mars 2015

define enum class with same name compared to enum

Why this compiles in c++11:



struct foo
{
enum class Resolution { None=10, Nominal=20 };
enum class Scale { None, Nominal };
};


while this doesn't:



struct foo
{
enum Resolution { None=10, Nominal=20 };
enum Scale { None, Nominal };
};


?


Aucun commentaire:

Enregistrer un commentaire