auto ref is on the docket

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 22 16:04:13 PDT 2015


On 06/23/2015 12:18 AM, kinke wrote:
>>> In C++ there's no problem with const&, so why they will be in D?
>>
>> Because const is transitive in D and therefore more restrictive.
>
> That's not a reason.

Yes it is.

> It's just an additional restriction imposed by D and only prevents
> you from using the proposed `in ref T`/`const auto ref T` *shudder*
> equivalents if const-transitiveness would be violated. In my
> day-to-day C++ work, I almost never have to do that.

Note "almost".


More information about the Digitalmars-d mailing list