This is what Visual C++ Express gives me with the exact same code:
Code:
0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
EDIT: The compiler's warning level was set to level 3, the default. This is what I get after jacking it up to level 4:
Code:
warning C4239: nonstandard extension used : 'argument' : conversion from 'X' to 'X &'
1> A non-const reference may only be bound to an lvalue
So, not an error, only a warning - and only after the warning level is raised higher than the default.