| title | Warning C26492 | ||
|---|---|---|---|
| ms.date | 03/22/2018 | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| description | CppCoreCheck rule C26492 that enforces C++ Core Guidelines Type.3 |
Don't use
const_castto cast awayconst.
void function(const int* constIntPtr)
{
int* intPtr = const_cast<int*>(constIntPtr); // C26492, Do not use const_cast to cast away const
}