Am 13.07.2011, 16:58 Uhr, schrieb Tyro[a.c.edwards] <nos...@home.com>:
Don't know it this is the right answer or a possible bug but it does the trick:

void h() { import std.stdio; write("h()"); }

class Bla
{
     mixin wrap!h;
}

mixin template wrap(alias f)
{
     void blub(typeof(&f) g = &f)
     {
        g();
     }
}

void main()
{
     Bla b = new Bla();
     b.blub();
}

Thanks!
Unfortunately it doesn't work with more complex functions:

Error: arithmetic/string type expected for value-parameter, not cl_errcode C function(cl_program program, uint param_name, ulong param_value_size, void* param_value, ulong* param_value_size_ret)

Reply via email to