diff --git a/docs/handbook/guidelines/c_cpp.md b/docs/handbook/guidelines/c_cpp.md index dfe91a1b..635c8499 100644 --- a/docs/handbook/guidelines/c_cpp.md +++ b/docs/handbook/guidelines/c_cpp.md @@ -99,7 +99,19 @@ int64_t size() const {...} ### Enums -- Labels in enums should be in all capitals. +- Enum type names should avoid being confused with related structs or classes. + + Recommended suffixes include: + + - `Type` & `Mode` for discrete values. + - `Flag` & `Mask` for values which are treated as bit-masks. + + However these are guidelines which may be applied selectively. + Terms such as `Direction`, `Stage`, `Code` & `Method` (among others) are + sufficiently descriptive not to require one of the recommended suffixes. + +- C style enum labels in enums should be in all capitals. +- C++ style enums labels which use `enum class` should use pascal-case. - Enums used in DNA files should have explicit values assigned. ### Function arguments