https://issues.dlang.org/show_bug.cgi?id=8845
Nick Treleaven <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=9238 --- Comment #20 from Nick Treleaven <[email protected]> --- (In reply to Manu from comment #0) > I've heard arguments about the safety of the operation, but the 'workaround' > is just to create a temporary, which has identical security properties. > ... > Perhaps this behaviour could be restricted to ref const, or ref in, if we're > getting worried about the safety of the operation? That would perhaps even > improve on how behaves now. I think rvalues could be passed to const ref parameters so long as that parameter is not return ref. The reason is in case we decide to support local refs initialized from a return ref function. --
