Code behaves incorrectly if it is compiled in std.functional

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 5 03:54:36 PDT 2015


On Fri, 05 Jun 2015 09:44:09 +0000, Marc Schütz wrote:

> On Friday, 5 June 2015 at 04:39:28 UTC, ketmar wrote:
>> On Fri, 05 Jun 2015 03:56:05 +0000, anonymous wrote:
>>
>>> On Friday, 5 June 2015 at 03:45:18 UTC, ketmar wrote:
>>>> `auto int a`?! it shouldn't be accepted at all!
>>> 
>>> Yeah, but it's the same with "auto ref".
>>
>> `auto ref` has a well-defined meaning. yet `auto int` is nonsence. it's
>> definitely a compiler bug. ;-)
> 
> I don't think so. `auto` is a valid storage class like `const`,
> `immutable` and `shared`.

`auto` is not a storage class, but a `type placeholder`. at least this is 
what i've been told by W or A (sorry, i can't remember the link; i think 
it was somewhere in NG... or in bugzilla...). there is one exception to 
this rule, though: `auto ref`.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150605/83a652ec/attachment.sig>


More information about the Digitalmars-d mailing list