[dmd-beta] D2 beta 2.057
Walter Bright
walter at digitalmars.com
Mon Dec 12 11:55:27 PST 2011
So far, this reduces to:
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;
extern(Windows) alias void function(fpw_t fp) cb_t;
struct DllImport(TFunction) {
//extern(Windows)
static void bar(ParameterTypeTuple!(cb_t) args) {
pragma (msg, "TFunction1: " ~ typeof(args[0]).stringof);
}
}
extern(Windows)
alias DllImport!(cb_t) InternetSetStatusCallback;
void test()
{
extern(Windows) static void foo() { }
InternetSetStatusCallback.bar(&foo);
}
On 12/12/2011 2:16 AM, Richard Webb wrote:
>
> I tried building Juno with the latest beta, and got a build failure related to
> ParameterTypeTuple and function type parameters.
>
> Seems to be related to this: In 2.056, the code
>
More information about the dmd-beta
mailing list