Member function pointers

dennis luehring dl.soluz at gmx.net
Mon Jun 10 09:38:47 PDT 2013


Am 10.06.2013 18:28, schrieb Jacob Carlborg:
> On 2013-06-10 17:36, Manu wrote:
>
>> My suggestion is: void function(T this) funcptr;
>> This is a function pointer (not a delegate), but using keyword 'this'
>> gives the critical detail to the compiler that it's a member function
>> pointer, and to use the appropriate calling convention when making calls
>> through this pointer.
>> UFCS makes it awesome.
>
> What I don't understand is what this give you that a delegate doesn't.
> You need the "this" pointer to call the function pointer anyway. With a
> delegate it's bundled.
>

maybe he just don't need one to handle the this ptr because he wants to 
call several/hundrets of member-functions?


More information about the Digitalmars-d mailing list