Code behaves incorrectly if it is compiled in std.functional

anonymous via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 4 20:15:45 PDT 2015


On Friday, 5 June 2015 at 02:38:39 UTC, ketmar wrote:
> here's dustmited source:

Further reduced:

void unaryFun()(auto int a) pure nothrow @safe @nogc {}
alias Identity(F) = F;
void main()
{
   unaryFun!()(41);
   static void fun(int n) pure nothrow @safe @nogc {}
   alias F = typeof(fun);
   pragma(msg, F); /* ...(int n) */
   pragma(msg, Identity!F); /* ...(auto int) */
}


More information about the Digitalmars-d mailing list