title: Do constant and reinterpret cast happen at compile time?
body: <p>I have read that <code>static_cast</code> happens at compile time and <code>dynamic_cast</code> happens at run time thus are slower than <code>static_cast</code>. A <code>dynamic_cast</code> can either return a null ptr (when using with a pointer) or otherwise throw a bad cast exception. My question is what about <code>reinterpret_cast</code> and <code>const_cast</code> do they happen at compile time or run-time ? I would think that interpret cast happens at run-time since it behaves like <code>dynamic_cast</code> indicating if the cast was successful. Am i correct ? What about const_cast is that compile time ?</p>