new-expression and delete-expression on const reference and const pointer
问题 C++ Much literature says const references cannot be used to modify their referents and const pointers cannot be used to modify their pointees. Then, why can they be delete d? const int& cirDynamic = *( new int(5) ); // ^ 'const int& cirDynamic = *( &( *( new int(5) ) ) );' gives same output below cout << cirDynamic << endl; // 5 delete &cirDynamic; cout << cirDynamic << endl; // garbage value I know the trailing const in T* const only prevents the pointer from being reseated, but below I use