Const ref and rvalues again...

Rob T rob at ucora.com
Sun Nov 4 21:05:07 PST 2012


On Monday, 5 November 2012 at 03:26:10 UTC, Jonathan M Davis
wrote:
> And when we argued for altering it so that it operated like 
> const ref in C++
> (which allows const ref in D to continue to function like it 
> does now), some
> folks complained, because they've found the current semantics 
> of auto ref to
> be useful (something to do with propagating the exact, original 
> type, I
> think).

I would expect that auto ref for a template and for a non
template should work in exactly the same way, so why would there
be a difference? If there must be a difference, there should be
different semantics for specifying the difference, otherwise the
inconsistent behaviours among identical semantics will only serve
to confuse people.

--rt



More information about the Digitalmars-d mailing list