
21 Jun
2013
21 Jun
'13
4:23 p.m.
John Maddock wrote:
However... in the C++11 world I can think of one legitimate use case that's broken by this - and that's when you have user-defined literals:
auto x = +1234_my_suffix;
which results in a dangling-reference-to-temporary.
I think we can avoid dangling references by adding a unary plus operator overload (that returns a value) for rvalues. Regards, Michel