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

So sánh C++ vs C++0x vs C++11 vs C++98


C++98 – Bản đầu tiên của chuẩn C++. Định nghĩa cấu trúc ngôn ngữ cơ bản, STL, thư viện chuẩn.

C++03 – Bản sửa đổi tiếp theo. Chủ yếu sửa lỗi (92 core defect, 125 library defect), chỉ thêm 1 tính năng mới: value initialization.

C++0x – Tên gọi dự án đang tiến hành (working draft), dự kiến xong 2008-09 nhưng hoàn thành 2011.

C++11 – Chuẩn hiện đại 2011. Nhiều mở rộng lớn:

  • Initializer lists
  • Automatic type deduction
  • Rvalue references và move constructors
  • constexpr
  • Sửa định nghĩa POD
  • Uniform initialization
  • Range-based for loop
  • Lambda functions và expressions
  • Alternative function syntax
  • Explicit overrides và final
  • nullptr
  • Strongly typed enumerations
  • Right angle bracket fix
  • Variadic templates
  • Multithreading memory model
  • Hash tables trong STL
  • Regular expressions
  • Smart pointers (shared_ptr, weak_ptr)

Danh sách đầy đủ: https://en.wikipedia.org/wiki/C%2B%2B11