Getting the address of a member function at compile time inside a member function

williamleo09 williamleo.ceo at gmail.com
Mon Jul 14 19:27:16 UTC 2025


D requires a this context for non-static member functions, so you 
can’t get a raw function pointer at compile time inside a member 
without a helper. Your enum fnptr!foo = &fn workaround is the 
cleanest solution.


More information about the Digitalmars-d mailing list