Warning C26492
Don't use
const_cast
to cast awayconst
.
See also
Example
void function(const int* constIntPtr)
{
int* intPtr = const_cast<int*>(constIntPtr); // C26492, Do not use const_cast to cast away const
}
Цей браузер більше не підтримується.
Замініть його на Microsoft Edge, щоб користуватися перевагами найновіших функцій, оновлень безпеки та технічної підтримки.
Don't use
const_cast
to cast awayconst
.
void function(const int* constIntPtr)
{
int* intPtr = const_cast<int*>(constIntPtr); // C26492, Do not use const_cast to cast away const
}