Code behaves incorrectly if it is compiled in std.functional

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 8 06:46:22 PDT 2015


On 06/08/2015 03:12 PM, ketmar wrote:
> On Mon, 08 Jun 2015 13:38:08 +0200, Timon Gehr wrote:
>
>> On 06/08/2015 09:30 AM, 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 `immutable const` -- not ok
>>>
>>> ergo, `auto` is not a storage class, but type placeholder.
>>>
>>>
>> This analogy does not work. 'immutable' and 'automatic storage' do not
>> conflict. 'immutable' and 'const' do conflict.
>>
>> 'immutable auto' is exactly the same as 'auto immutable'. There is no
>> 'int immutable'.
>
> ok. what that "automatic storage" means after all?


For all practical and theoretical purposes, it means absolutely nothing.

> except being a placeholder.
>

It indicates to the parser that what follows is a declaration. Nothing 
more. It does not hold the place of anything else.


More information about the Digitalmars-d mailing list