Freigeben über


Warnung C26465

Verwenden const_cast Sie nicht, um wegzukehren const. const_cast ist nicht erforderlich; Constness oder Volatilität wird von dieser Konvertierung nicht entfernt.

Siehe auch

C++ Core Guidelines Type.3

Beispiel

void function(int* const constPtrToInt)
{
  auto p = const_cast<int*>(constPtrToInt); // C26465, const is not being removed
}