Warning C26492
Don't use
const_cast
to cast awayconst
.
See also
Example
void function(const int* constIntPtr)
{
int* intPtr = const_cast<int*>(constIntPtr); // C26492, Do not use const_cast to cast away const
}
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ