Warning C26465
Don't use
const_cast
to cast awayconst
.const_cast
is not required; constness or volatility is not being removed by this conversion.
See also
Example
void function(int* const constPtrToInt)
{
auto p = const_cast<int*>(constPtrToInt); // C26465, const is not being removed
}
Athugasemdir
https://aka.ms/ContentUserFeedback.
Væntanlegt: Á árinu 2024 munum við hætta með GitHub-mál sem ábendingaleið fyrir efni og skipta því út fyrir nýtt ábendingakerfi. Frekari upplýsingar er að finna hér:Senda inn og skoða endurgjöf fyrir