/include/c++/4.1.2/bits/stl_vector.h:932: error: âbool ytl::std::operator==(int)â must have an argument/include/c++/4.1.2/bits/stl_vector.h: In function âbool ytl::std::operator==(int)â:
/usr/lib/gcc/x86_/in
match for «operator>» in «{0} > 0»/usr/lib/gcc/i686-redhat-linux/include/c++/4.6.0/bits/stl_pair.h:220:67: замечание: template<class _T1, class _T2> bool std::operator>(const std::
x;
这就是我认为会发生的事情:x被隐式地传递给一个bool,第一个否定被执行,然后最后一个否定被执行,所以一个强制转换和两个否定。我的问题是,与使用双重否定相比,不仅仅是转换为bool (执行int y = (bool)x;而不是int y = !!x)更快,因为您正在从执行中保存两个否定句。我可能错了,因为我在Linux内核中经常看到双重否定,但我不知道我的直觉哪里出了问题,也许你可以帮我解决问题。