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

Lịch sử ngôn ngữ C++

C++ có lịch sử từ 1979, khi Bjarne Stroustrup làm luận án tiến sĩ. Ông bắt đầu "C with Classes" – siêu tập của C, mục tiêu: đưa OOP vào C nhưng giữ portability, tốc độ, low-level.

Các mốc quan trọng

Năm Sự kiện
1979 Bắt đầu "C with Classes": class, inheritance cơ bản, inlining, default argument, strong type checking.
1983 Đổi tên thành C++ (++ = increment). Thêm: virtual function, function overloading, reference (&), const, comment //.
1985 C++ ra mắt thương mại (chưa chuẩn hóa).
1989 Cập nhật: protected, static member, multiple inheritance.
1990 Turbo C++ ra mắt – thêm nhiều thư viện, ảnh hưởng lớn.
1998 Chuẩn đầu tiên ISO/IEC 14882:1998 (C++98). Bao gồm STL.
2003 Sửa lỗi C++98 → C++03.
2011 C++11 (C++0x): regex, random, chrono, atomic, thread, range-for, auto, lambda, smart pointer, move semantics, variadic template, initializer_list, nullptr, static_assert, decltype...
2014 C++14: generic lambda, auto return type, [[deprecated]], binary literal, digit separator, variable template.
2017 C++17: structured binding, if constexpr, std::optional, std::variant, std::string_view, std::filesystem, parallel algorithms, fold expression, inline variable.
2020 C++20: concepts, modules, coroutines, ranges, std::format, three-way comparison (<=>), std::span, constexpr mở rộng, using enum.
2023 C++23: std::expected, std::mdspan, std::print/std::println, #embed, deducing this, multidimensional subscript, v.v.

Compiler C++ hiện đại (GCC 13+, Clang 16+, MSVC 19.3+) hỗ trợ gần như đầy đủ C++20 và phần lớn C++23.