Just before the release of 2.059, I implemented the behavior to avoid breaking of existing codes for only struct literals. I didn't support other rvalues with it, like such ternary expression. It was minimum hack.
I think it is a special behavior of 2.059, and I've been highly skeptical to leave it up to the future, even if changing it breaks existing codes. I also think that a need of 'auto ref stroage class for non-template function parameter' is increasing. Kenji Hara 2012/5/11 Jacob Carlborg <[email protected]>: > On 2012-05-11 09:18, Jonathan M Davis wrote: > >> struct literals work. They at least used to be lvalues for some bizarre >> reason. I'm not sure if they are now, because it went back and forth prior >> to >> the last release. They're either still lvalues or the first part of making >> rvalues work with ref has been implemented (but only with struct >> literals). >> I'm not sure which. >> >> - Jonathan M Davis > > > Why would the ternary operator make any difference? > > -- > /Jacob Carlborg
