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
}
משוב
https://aka.ms/ContentUserFeedback.
בקרוב: במהלך 2024, נפתור בעיות GitHub כמנגנון המשוב לתוכן ונחליף אותו במערכת משוב חדשה. לקבלת מידע נוסף, ראה:שלח והצג משוב עבור