跳转至

C++ 标准中值得使用的功能

A cheatsheet of modern C++ language and library features.

  • C++11

    • Move semantics
    • Variadic templates
    • Initializer lists
    • Attributes
    • Lambda expressions
    • Delegating constructors
    • auto
    • nullptr
    • Default functions
    • Deleted functions
    • Range-based for loops
    • Raw string literals
    • Converting constructors
  • C++14

    • Lambda capture initializers
    • decltype(auto)
    • std::variant
    • std::make_unique
  • C++17

    • Structured bindings
  • C++20

    • Range-based for loop with initializer
    • likely and unlikely attributes
    • Deprecate implicit capture of this
    • using enum