Allow Explicit Pointer for Auto Declaration

Jacob via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 30 01:34:49 PDT 2016


On Friday, 30 September 2016 at 05:01:52 UTC, Steven 
Schveighoffer wrote:
> On 9/29/16 9:48 PM, Jacob wrote:
>> It still requires the &, what it prevents is this situation:
>>
>> auto pValue = expr; // wanted pointer, expr evaluates to 
>> non-ptr value
>> through change of code or simply forgetting "&"
>
> Wait, what happens when you do that? If that's now an error, 
> this is a non-starter.
>
> -Steve

I said before it doesn't break existing code. Like before, you 
can do everything the same way without a change in behavior and 
auto with a "*" is currently invalid.


More information about the Digitalmars-d mailing list