Yak*_*kov 0 c++ int warnings casting boolean
在VS 10中,我收到警告:
warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
Run Code Online (Sandbox Code Playgroud)
试图编译
int x ;
static_cast<bool>(x);
Run Code Online (Sandbox Code Playgroud)
如何编写一个不会引起此警告的代码?