I have the following code
string three() { return \"three\"; } void mutate(string& ref) { } int main() { mutate(three()); return 0; }
It used to compile in VC6 compiler, so I guess to maintain backward comptibility VS2008 is supporting this non-standard extension. Try with /Za (disable language extension) flag, you should get an error then.