Function pointer pitfalls

Inquie via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 14 12:36:12 PDT 2017


On Tuesday, 14 March 2017 at 19:14:34 UTC, H. S. Teoh wrote:
> On Tue, Mar 14, 2017 at 06:59:58PM +0000, Inquie via 
> Digitalmars-d-learn wrote:
>> [...]
> [...]
>> > [...]
> [...]
>> [...]
> [...]
>
> Keep in mind, though, that the above creates a function pointer 
> with the same signature as the member function, but you may not 
> be able to assign a member pointer to it because it lacks 
> object context.  To wit:
>
> [...]

Yeah, I don't think I'll run in to that problem since I'm 
constructing the function ahead of time and only need the 
declaration but we'll see.

Thanks again.




More information about the Digitalmars-d-learn mailing list