Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
This function function-name could be marked
constexprif compile-time evaluation is desired (f.4).
See also
Example
const int GetTheAnswer(int x) noexcept { return 42 + x; } // Could be marked constexpr
void function1() noexcept
{
const int theAnswer = GetTheAnswer(0);
}
To reduce code analysis noise on new code, this warning isn't issued if the function has an empty implementation.
int function1(){ // no C26497
return 1;
}
void function2(){} // no C26497