"Vyacheslav Kononenko" <vy********@kononenko.netwrote in message
news:11**********************@l12g2000cwl.googlegr oups.com
I found out that recent MS VS (maybe elder too) treats temporary to
user types as lvalue or allows conversion. So something like this
would compile there:
//-----------------
struct Bar{};
void foo( Bar & );
void f() { foo( Bar() ); }
//-----------------
Are they moving towards new standard or it is their own initiative?
When I compile your code, it does give a warning:
warning C4239: nonstandard extension used : 'argument' : conversion from
'Bar' to 'Bar &'
A non-const reference may only be bound to an lvalue
At best, it compiles for reasons of backward compatibility. It reflects the
old, not the new.
--
John Carson