4.11.2. Other Implicit Conversions
In addition to the arithmetic conversions, there are several additional kinds of implicit conversions. These include:
Array to Pointer Conversions: In most expressions, when we use an array, the array is automatically converted to a pointer to the first element in that array:
int ia[10]; // array of ten intsint* ip = ia; // convert ia to a pointer to the first element
This conversion is not performed when an array is used with decltype
or as the operand of the address-of (&
), sizeof
, or typeid
(which we’ll cover in § 19.2.2 (p. 826)) operators. The conversion is also omitted when we initialize a reference ...
Get C++ Primer, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.