pointer to member without 'this' - mem_fun like
Jarrett Billingsley
kb3ctd2 at yahoo.com
Tue Mar 18 05:51:03 PDT 2008
"Frits van Bommel" <fvbommel at REMwOVExCAPSs.nl> wrote in message
news:fro9ip$dib$1 at digitalmars.com...
>>
>> Thanks, this should do it - however I still need an(other) instance when
>> passing the delegate, right?
>
> You *might* get away with using &Class.memberfn to fill in dg.funcptr. But
> I've never tried this, so you might want to make sure it works before
> using it for anything serious.
It does work, at least in my experience. Of course this bypasses any vtable
lookup so you'll just be getting the implementation of the method from
Class.
More information about the Digitalmars-d-learn
mailing list