0

Possible Duplicate:
When should static_cast, dynamic_cast and reinterpret_cast be used?

what is the difference between those two casts,

const_cast<const A&> and static_cast<const A&>

what do You usually use in your practice? thanks in advance

Community
  • 1
  • 1
rookie
  • 7,453
  • 13
  • 45
  • 57
  • 1
    I think you meant `const_cast`. Also an exact duplicate of http://stackoverflow.com/questions/3402318/const-cast-vs-static-cast – David Titarenco Oct 09 '10 at 19:57
  • 2
    Voted to close. See the nice answer on the other thread. In short: If `static_cast` suffices, take it. The point of `const_cast` is it to cast *away* const. You con't need it to *add* const. So, you better avoid `const_cast` if possible -- just to avoid any const->nonconst accidents. – sellibitze Oct 09 '10 at 20:04

0 Answers0