Code behaves incorrectly if it is compiled in std.functional

via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 8 02:27:34 PDT 2015


On Monday, 8 June 2015 at 07:30:06 UTC, ketmar wrote:
> On Sun, 07 Jun 2015 18:50:07 +0200, Timon Gehr wrote:
>
>> On 06/06/2015 08:10 AM, ketmar wrote:
>>> if `auto` can play a role of type placeholder
>> 
>> There is no such thing as a type placeholder.
>
> there is:
>
> `immutable auto` -- ok

Allocate a variable on the stack, and make it immutable => OK

> `immutable const` -- not ok

Make the variable immutable, and make it const => nonsense

>
> ergo, `auto` is not a storage class, but type placeholder.

No.


More information about the Digitalmars-d mailing list