need help to get member function const address

Calvin P changlon at gmail.com
Thu Mar 19 13:12:44 UTC 2020


On Thursday, 19 March 2020 at 06:34:40 UTC, Alex wrote:
> A non-static member method can use the context of the struct 
> where it is defined in. E.g. it could alter a member variable.
> This context has to be constructed at run time (and there could 
> be many instances of the context) and does not exist in compile 
> time. Therefore the difference to the static method.

I am not try to get the context, I just need the function address 
which is const and should able to get at compile time.


On Thursday, 19 March 2020 at 09:13:42 UTC, Boris Carvajal wrote:
> On Thursday, 19 March 2020 at 04:30:32 UTC, Calvin P wrote:
>
> You can assemble a delegate with an struct pointer or class 
> reference and a function member pointer.

Sorry for duplicate thread.

The last time I submit my question on web, it keep get blocked. I 
thought it was not submitted successfully, so I submit from draft 
again.


More information about the Digitalmars-d-learn mailing list