/W4 开启之后 在如下情况下都会遇到C4127
:
if (1)
while (true)
等等
为了解决while(true) 翻了好多网页都没找到
最后使用无奈的手法达到了目的:
bool get_true() { return true; }
while (get_true()) {}
这样写会消耗一些性能 不过为了/w4 还是甘愿干掉所有的红叉叉
/W4 开启之后 在如下情况下都会遇到C4127
:
if (1)
while (true)
等等
为了解决while(true) 翻了好多网页都没找到
最后使用无奈的手法达到了目的:
bool get_true() { return true; }
while (get_true()) {}
这样写会消耗一些性能 不过为了/w4 还是甘愿干掉所有的红叉叉