一個團隊的編程標準是非常重要的,以下是我整理歸納的Coding Standard,並不只適用於c++,關於原因並不多做說明。 Coding Standard是必須遵守的
[TOC]
以更高警告級別進行更乾淨的編譯[C++CS01][^1]
今天試用 clang 編譯程式, 發覺它有個不錯的選項: -Wglobal-constructors。用這選項編譯, 遇到有 non-local static 物件會依賴其它函式 (包含 constructor) 設值時, 會輸出 warning。
使用自動化建置系統[C++CS02]
使用版本控制系統[C++CS03]
[^1]: [C++CS] C++ Coding Standards
[^2]: [EC] Effective C++ 3/e
[^3]: [MEC] More Effective C++
There was an error while loading. Please reload this page.