Hello,

void foo::p() const{    
member = 1;                       // illegal    
const_cast <int&> (member) = 1;   // a bad practice but legal 
}

Where I got this from comments this as bad practice

const_cast <int&> (member) = 1

So does that mean if this is a template it is bad practice to use one
this way? Why is this bad practice?

thanks

KW

Reply via email to