Visual Studio C++ compiles the following: class someclass { // }; void somefunction(someclass &) { // } int main() { somefunction(someclass()); return 0; } But Dev-C++ (Bloodshed) and g++ don't. I wonder if Visual Studio C++ is smarter here.