https://www.youtube.com/watch?v=2h2hdRqRIRk

Auto type conversion

Implicit/auto conversions: compiler auto converts from 1 type to another without developers explicitly doing so:

It creates a temp object from the input…

Explicit type conversion

Casts are explicit type conversion.

C-style cast

(<type>)<var>

Under the hood, C++ compiler implements C-style cast by attempt the following casts sequentially until first success:

  1. const_cast
  2. static_cast
  3. static_cast followed by const_cast
  4. reinterpret_cast (no copy!)
  5. reinterpret_cast followed by const_cast

Function pointers