run-time type of the object. In C++ implementations, this is commonly done using virtual function tables. If the object type is known, this may be bypassed by prepending a fully qualified class name before the function call, but in general calls to virtual functions are resolved at run time. In addition to standard member functions, operator overloads and destructors can be virtual. An inexact rule based on practical experience states that if any function in the class is virtual, the destructor should be as well. As the type of an object at its creation is known at compile time, constructors, and by extension copy constructors, cannot be virtual. Nonetheless, a situation may arise where a copy of an object needs to be created when a pointer to a derived object is passed as a pointer to a base object. In such a case, a common solution is to create a clone() (or similar) virtual function that creates and returns a copy of the derived class when called. A member function can also be made "pure virtual" by appending it with = 0 after the closing parenthesis and before the semicolon. A class containing a pure virtual function is called an abstract class. Objects cannot be created from an abstract class; they can only be derived from. Any derived class inherits the virtual function as pure and must provide a non-pure definition of it (and all other pure virtual functions) before objects of the derived class can be created. A program that attempts to create an object of a class with a pure virtual member function or inherited pure virtual member function is ill-formed. Lambda expressions C++ provides support for anonymous functions, also known as lambda expressions, with the following form: [capture](parameters) -> return_type { function_body } Since C++20, the keyword is optional for template parameters of lambda expressions: [capture]<template_parameters>(parameters) -> return_type { function_body } If the lambda takes no parameters, and no return type or other specifiers are used, the () can be omitted, that is, [capture] { function_body } The return type of a lambda expression can be automatically inferred, if possible, e.g.: [](int x, int y) { return x + y; } // inferred [](int x, int y) -> int { return x + y; } // explicit The [capture] list supports the definition of closures. Such lambda expressions are defined in the standard as syntactic sugar for