警告 C26493

请勿使用 C 样式转换。

另请参阅

C++ Core Guidelines Type.4

示例

void function(const int* const_i)
{
    int* nonconst_i = (int*)const_i; // C26493 Don't use C-style casts
    int i = (int)*const_i; // C26493 Don't use C-style casts
}