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