Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> C++

Những thay đổi lớn nhất trong C++11


C++11 là chuẩn C++ hiện đại năm 2011 mang lại nhiều mở rộng và cải tiến lớn. Các thay đổi chính:

  • Initializer lists
  • Automatic type deduction
  • Rvalue references và move constructors
  • constexpr – Generalized constant expressions
  • Modification to the definition of plain old data
  • Uniform initialization
  • Range-based for loop
  • Lambda functions and expressions
  • Alternative function syntax
  • Explicit overrides and final
  • A constant null pointer, nullptr
  • Strongly typed enumerations
  • Right angle bracket not being treated as an operator
  • Variadic templates
  • Multithreading memory model
  • Added Hash tables to the STL
  • Added Regular expressions to the Standard Library
  • Added General-purpose smart pointers like shared_ptr, weak_ptr, etc.

Và nhiều hơn nữa. Danh sách đầy đủ ví dụ tại: https://en.wikipedia.org/wiki/C%2B%2B11