C++ Modern Coding Guide
簡介
RAII
Smart Pointer
Mutex & Lock
IO
Thread
Legacy C code
Constructors, Assignments, and Destructors
Function
OOP
其他
Named Cast
auto
使用 {} 初始化物件
使用 nullptr 取代 NULL
使用 using 取代 typedef
Enum
namespace AA::BB
在 if 或 switch 定義參數
std::filesystem
使用 std::array 取代 T[]
傳統 C 的迷思
不要:使用goto end來釋放資源
不要:不使用 exception
不要:宣告所有變數在 function 開頭
Powered by
GitBook
namespace AA::BB
namespace AA::BB
// C++14
namespace
AA {
namespace
BB{
class
C {}; }}
// C++17
namespace
AA::BB {
class
C {}; }
Reference
Wiki: C++17
results matching "
"
No results matching "
"