Static cast

In the C++ programming language,  is an operator that performs an explicit type conversion.

Syntax
The type parameter must be a data type to which object can be converted via a known method, whether it be a builtin or a cast. The type can be a reference or an enumerator. All types of conversions that are well-defined and allowed by the compiler are performed using.

The  operator can be used for operations such as:
 * converting a pointer of a base class to a pointer of a non-virtual derived class (downcasting);
 * converting numeric data types such as enums to ints or floats.

Although  conversions are checked at compile time to prevent obvious incompatibilities, no run-time type checking is performed that would prevent a cast between incompatible data types, such as pointers. A  from a pointer to a class   to a pointer to a derived class   is ill-formed if   is an inaccessible or ambiguous base of. A  from a pointer of a virtual base class (or a base class of a virtual base class) to a pointer of a derived class is ill-formed.