Code behaves incorrectly if it is compiled in std.functional

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 5 12:38:07 PDT 2015


On 6/5/15 12:19 PM, Meta wrote:
> On Friday, 5 June 2015 at 12:32:03 UTC, ketmar wrote:
>> but it does! both with 2.067.1 downloaded from dlang.org and with git
>> HEAD. it may not do what you expect it to do (i don't know what it should
>> do anyway), but dmd happily accepts that code.
>
> Hmm, maybe I'm only on 2.070 then. I'll upgrade and see if it still
> fails to compile.

Hello from the future!!!

When I use auto int a in a normal function, I get this:

Error: auto can only be used for template function parameters

But unaryFun()(auto int a) is a template. Perhaps your blocker is for 
non-templates?

-Steve


More information about the Digitalmars-d mailing list