使用C++ 11提供了一种初始化和声明变量的新方法.
原版的
int c_derived = 0;
C++ 11
int modern{0};
如果有的话,每种方法的优缺点是什么?为什么要实施新方法?编译器有什么不同的做法吗?
c++ coding-style c++11
c++ ×1
c++11 ×1
coding-style ×1