Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
#include<iostream> struct Foo { }; void func(Foo& f) { std::cout << "foo" ; } int main() { func(Foo());//ok compile std::cin.ignore(); return 1; }
标准没有说这个王者不合法?这是一个错误吗?
这不应该是合法的。但是一些旧版本的 Visual C++(例如 VC6)允许它,afaik。