Partilhar via


Aviso C26471

Não use reinterpret_cast. Um molde de void* pode usar static_cast (tipo.1)

Observações

Nome da análise de código: NO_REINTERPRET_CAST_FROM_VOID_PTR

Exemplo

void function(void* pValue)
{
    {
        int* pointerToInt = reinterpret_cast<int*>(pValue); // C26471, use static_cast instead
    }
    {
        int* pointerToInt = static_cast<int*>(pValue); // Good
    }
}

Ver também

Tipo de diretrizes principais do C++.1