[dmd-beta] D2 beta 2.057
Walter Bright
walter at digitalmars.com
Mon Dec 12 12:07:36 PST 2011
It worked on 2.056, and fails now. Definitely a bug.
Anyone want to try that divide-and-conquer git thing?
---------------------------
template ParameterTypeTuple(func)
{
static if (is(func Fptr : Fptr*) && is(Fptr P == function)
alias P ParameterTypeTuple;
else
static assert(0, "argument has no parameters");
}
extern(Windows) alias void function() fpw_t;
alias void function(fpw_t fp) cb_t;
//extern(Windows)
void bar(ParameterTypeTuple!(cb_t) args) {
pragma (msg, "TFunction1: " ~ typeof(args[0]).stringof);
}
extern(Windows) void foo() { }
void test()
{
bar(&foo);
}
----------------------------------------
More information about the dmd-beta
mailing list