Preprocessor

The preprocessor is executed at translation phase 4, before the compilation. The result of preprocessing is a single file which is then passed to the actual compiler. Directives The preprocessing directives control the behavior of the preprocessor. Each directive occupies one line and has the following format: # character preprocessing instruction (one of define, undef, include, if, ifdef, ifndef, else, elif, endif, line, error, pragma) [1] arguments (depends on the instruction) line b

Predicate

The Predicate concept describes a function object that takes a single iterator argument that is dereferenced and used to return a value testable as a bool. In other words, if an algorithm takes a Predicate pred and an iterator first, it should be able to test the iterator using the predicate via a construct like if (pred(*first)) {...}. The function object pred shall not apply any non-constant function through the dereferenced iterator. This function object may be a pointer to function or an ob

Pointer declaration

Declares a variable of a pointer or pointer-to-member type. Syntax A pointer declaration is any simple declaration whose declarator has the form. * attr(optional) cv(optional) declarator (1) nested-name-specifier * attr(optional) cv(optional) declarator (2) 1) Pointer declarator: the declaration S* D; declares D as a pointer to the type determined by decl-specifier-seq S. 2) Pointer to member declarator: the declaration S C::* D; declares D as a pointer to member of C of type

PODType

Specifies that the type is POD (Plain Old Data) type. This means the type is compatible with the types used in the C programming language, can be manipulated using C library functions: it can be created with std::malloc, it can be copied with std::memmove, etc, and can be exchanged with C libraries directly, in its binary form. Note, that the standard doesn't define a named requirement or concept with this name. This is a type category defined by the core language. It is included here as concep

Phases of translation

The C++ source file is processed by the compiler as if the following phases take place, in this exact order: Phase 1 1) The individual bytes of the source code file are mapped (in implementation defined manner) to the characters of the basic source character set. In particular, OS-dependent end-of-line indicators are replaced by newline characters. The basic source character set consists of 96 characters: a) 5 whitespace characters (space, horizontal tab, vertical tab, form feed, new-line)

partial template specialization

Allows customizing class templates for a given category of template arguments. Syntax template < parameter-list > class-key class-head-name < argument-list > declaration where class-head-name identifies the name of a previously declared class template. This declaration must be in the same namespace as the primary template definition which it specializes. For example, template<class T1, class T2, int I> class A {}; // primary template template<class T, int I>

Parameter pack

A template parameter pack is a template parameter that accepts zero or more template arguments (non-types, types, or templates). A function parameter pack is a function parameter that accepts zero or more function arguments. A template with at least one parameter pack is called a variadic template. Syntax Template parameter pack (appears in a class template and in a function template parameter list). type ... Args(optional) (1) (since C++11) typename|class ... Args(optional) (2) (

override specifier

Specifies that a virtual function overrides another virtual function. Syntax The identifier override, if used, appears immediately after the declarator in the syntax of a member function declaration or a member function definition. declarator virt-specifier-seq(optional) pure-specifier(optional) (1) declarator virt-specifier-seq(optional) function-body (2) 1) In a member function declaration, override may appear in virt-specifier-seq immediately after the declarator, and befor

override

Usage override specifier

Overload resolution

In order to compile a function call, the compiler must first perform name lookup, which, for functions, may involve argument-dependent lookup, and for function templates may be followed by template argument deduction. If these steps produce more than one candidate function, then overload resolution is performed to select the function that will actually be called. In general, the candidate function whose parameters match the arguments most closely is the one that is called. Details Before ove