1.auto
2.nullptr
3.智能指针 shared_ptr, unique_ptr, weak_ptr
std::shared_ptr<int> p1 = std::make_shared<int>(10);
4. constexpr: const 用于为修饰的变量添加“只读”属性;而 constexpr 关键字则用于指明其后是一个常量(或者常量表达式),编译器在编译程序时可以顺带将其结果计算出来,而无需等到程序运行阶段,这样的优化极大地提高了程序的执行效率。
1.auto
2.nullptr
3.智能指针 shared_ptr, unique_ptr, weak_ptr
std::shared_ptr<int> p1 = std::make_shared<int>(10);
4. constexpr: const 用于为修饰的变量添加“只读”属性;而 constexpr 关键字则用于指明其后是一个常量(或者常量表达式),编译器在编译程序时可以顺带将其结果计算出来,而无需等到程序运行阶段,这样的优化极大地提高了程序的执行效率。
9451

被折叠的 条评论
为什么被折叠?