| title | Warning C26465 | ||
|---|---|---|---|
| ms.date | 03/22/2018 | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| description | CppCoreCheck rule C26465 that enforces C++ Core Guidelines Type.3 |
Don't use
const_castto cast awayconst.const_castis not required; constness or volatility is not being removed by this conversion.
void function(int* const constPtrToInt)
{
auto p = const_cast<int*>(constPtrToInt); // C26465, const is not being removed
}