Sections[lang]

Language

The core language as it is written now, from values and moves to lambdas and modules, for developers who learned C++ once and need the current answer.

Clause
1 of 8
Answers
35, newest first
Page
4 of 4
Written for
C++11, C++17, C++20
Written by

Answers in Language 35, newest first

  1. C++ virtual functions: override, pure virtual and the traps

    How a C++ virtual function call is resolved, why to write override and a virtual destructor, pure virtual functions, and which warnings catch the traps.

    §1.217 min readC++11

    written for C++11

  2. C++ move semantics: what std::move and && really do

    What a move is, why std::move moves nothing, what C++17, C++20 and C++23 changed about temporaries and returns, and four move mistakes clang-tidy catches.

    §1.317 min readC++20

    written for C++20

  3. Rule of zero: the special members C++ writes for you

    Which special member functions C++ declares for a class, what declaring one does to the others, and when to write none, all five, or delete them.

    §1.413 min readC++20

    written for C++20

  4. C++ try catch: how to throw and catch exceptions

    C++ try, catch and throw: the syntax, why you catch by const reference, the order of handlers, your own exception type, and what happens when nothing catches.

    §1.53 min readC++17

    written for C++17

  5. using namespace std: what it does and what to write instead

    What using namespace std does to name lookup, the clashes and silent overload changes it caused on four compilers, and what to write instead.

    §1.615 min readC++17

    written for C++17