ES.32: Use ALL_CAPS for all macro names
ES.32:宏定義名稱全部大寫
Reason(原因)
Convention. Readability. Distinguishing macros.
習慣。可讀性。區分宏定義。
Example(示例)
#define forever for (;;) /* very BAD */
#define FOREVER for (;;) /* Still evil, but at least visible to humans */
Enforcement(實施建議)
Scream when you see a lower case macro.
如果看到小寫的宏定義,尖叫!
原文鏈接
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es32-use-all_caps-for-all-macro-names
覺得本文有幫助?歡迎點贊並分享給更多的人。
閱讀更多更新文章,請關注微信公衆號【面向對象思考】