From 9160dbb818f69ab91948d33f57a31f4c5dca77d3 Mon Sep 17 00:00:00 2001 From: Thibault Kruse Date: Thu, 11 Aug 2016 19:07:44 +0200 Subject: [PATCH] invalid enums --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 5c87b20..fcc9ce8 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -7512,8 +7512,8 @@ The default gives a consecutive set of values that is good for `switch`-statemen ##### Example enum class Col1 { red, yellow, blue }; - enum class Col2 { red = 1, red = 2, blue = 2 }; // typo - enum class Month { jan = 1, feb, mar, apr, mar, jun, + enum class Col2 { red = 1, yellow = 2, blue = 2 }; // typo + enum class Month { jan = 1, feb, mar, apr, may, jun, jul, august, sep, oct, nov, dec }; // starting with 1 is conventional enum class Base_flag { dec = 1, oct = dec << 1, hex = dec << 2 }; // set of bits