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) では許可されています。