| title | C26471 | |
|---|---|---|
| ms.date | 03/22/2018 | |
| ms.topic | reference | |
| f1_keywords |
|
|
| helpviewer_keywords |
|
|
| description | CppCoreCheck rule C26471 that enforces C++ Core Guidelines Type.1 |
Don't use reinterpret_cast. A cast from void* can use static_cast.
void function(void* pValue)
{
{
int* pointerToInt = reinterpret_cast<int*>(pValue); // C26471, use static_cast instead
}
{
int* pointerToInt = static_cast<int*>(pValue); // Good
}
}