将对象的常量性移除,即去掉const限定。
int main()
{
const int c = 2;
#if 0
int &cc = c;//error: 将int&类型的引用绑定到const int 时,限定符被丢弃
int *pc = &c;//error: const int * 不能初始化int *实体
#endif
#if 1
int & rc = const_cast<int &>(c);
rc = 3;
cout << "after cast" << endl;
//地址相同