Pointers to non-static member functions!
Daniel Murphy
yebblies at nospamgmail.com
Wed Jun 8 06:27:21 PDT 2011
"Trass3r" <un at known.com> wrote in message news:op.vwq80v023ncmek at enigma...
>
> ??
> Shouldn't this just return a delegate?
I don't think getting a delegate makes any sense without an instance.
I'm talking about this case:
class A
{
void func();
}
void main()
{
// returns a nonsense function pointer
auto f = &A.func;
// returns a working delegate
auto a = new A();
auto g = &a.func;
}
More information about the Digitalmars-d
mailing list