Merge pull request #416 from tituswinters/enum.3

Identifiers in enum class can overlap.
This commit is contained in:
Gabriel Dos Reis 2015-12-02 05:28:59 -08:00
commit 941661a495

View File

@ -6252,7 +6252,7 @@ Instead use an `enum class`:
void PrintColor(int color);
enum class Webcolor { red=0xFF0000, green=0x00FF00, blue=0x0000FF };
enum class Productinfo { Red=0, Purple=1, Blue=2 };
enum class Productinfo { red=0, purple=1, blue=2 };
Webcolor webby = Webcolor::blue;
PrintColor(webby); // Error: cannot convert Webcolor to int.