On Tuesday, October 20, 2015 at 2:46:38 PM UTC-4, Paavo Helde wrote:
> michael wrote in
> > Hi Everyone,
> >
> > Will anything be broken in C++ if we allow lvalue reference to bind a
> > rvalue (a temporary)?
>
> This has been tried and considered to have failed ca 20 years ago. The
> canonical example:
>
> void increment(int& x) {
> ++x;
> }
>
> int main() {
> long y = 0;
> increment(y);
> return y;
> }
Yep. Thank you for pointing that out!
Regards,
Michael