C++

C++ is a general-purpose programming language created by Bjarne Stroustrup as an extension of the C programming language, or “C with Classes”. It is widely used for system/software development, game development, drivers, client-server applications, and embedded firmware.

Versions

C++98

  • First standardized version of C++.
  • Introduced the Standard Template Library (STL).
  • Added exceptions, RTTI, and namespaces.
  • Standardized templates and operator overloading.

C++03

  • Bug-fix and clarification release for C++98.
  • Improved template handling, value initialization, and standard library conformance.
  • Introduced small but notable additions like std::ios_base::failure and better export semantics.

C++11

  • Major modernization.
  • Core features:
  • Library additions:
    • Smart pointers, unordered containers, threading library, regex, chrono, tuples.

C++14

  • Refinement of C++11; small usability upgrades.
  • Features:
    • Generic lambdas, return type deduction, binary literals.
    • Relaxed constexpr rules and small library improvements (std::make_unique).

C++17

  • Consolidation and cleanup of C++11/14 with new high-level utilities.
  • Core features:
    • Structured bindings, if constexpr, fold expressions, inline variables.
    • Class template argument deduction (CTAD), guaranteed copy elision.
  • Library additions:
    • std::optional, std::variant, std::any.
    • std::string_view, std::filesystem, and parallel algorithms.
    • New utilities in <memory_resource> and <execution>.

C++20

  • A major leap forward introducing concepts, modules, and coroutines.
  • Core features:
    • Concepts for constraining templates.
    • Modules as a faster, cleaner alternative to headers.
    • Coroutines (co_await, co_yield, co_return) for async programming.
    • Three-way comparison operator (<=> or “spaceship operator”).
    • consteval, constinit, and more powerful constexpr functions.
  • Library additions:
    • std::span, std::ranges, std::format, std::source_location.
    • Calendar and timezone support in <chrono>.
    • std::jthread, std::stop_token, and synchronization primitives.
    • Concepts-based ranges library and the views framework.

C++23

  • Incremental but meaningful refinement of C++20.
  • Core features:
    • Deduction guides for more containers and aggregates.
    • if consteval, explicit for operator(), and more constexpr expansions.
    • constexpr dynamic allocation (heap operations now allowed in constexpr).
    • Improved pattern matching groundwork via std::visit extensions.
  • Library additions:
    • std::expected (error handling without exceptions).
    • std::print / std::println (fast I/O using std::format backend).
    • std::flat_map / std::flat_set (cache-friendly associative containers).
    • std::move_only_function as a lightweight, move-only callable wrapper.
    • Expanded ranges algorithms and string views.
    • Standardized stacktrace support (std::stacktrace).