Member function pointers

Simen Kjaeraas simen.kjaras at gmail.com
Mon Jun 10 13:31:18 PDT 2013


On Mon, 10 Jun 2013 14:53:33 +0200, Jacob Carlborg <doob at me.com> wrote:

> On 2013-06-10 14:36, Manu wrote:
>
>> funcptr pretends to be typed, but the type is just wrong. In your
>> example, the type is 'void function()', it should be 'void function(Foo
>> this)'.
>
> "void function()" is part of the complete type. It becomes complete with  
> the context pointer.

This is utter horseshit. Not that it's part of the complete type, nor even
that it becomes complete with the context pointer (though that is highly
dubious at best), but the type of funcptr. It's a disgrace, simple as that.
It should either be typeless, or it should take a void* as its first
argument. void* means 'magic ahead', so it would be kinda ok.

-- 
Simen


More information about the Digitalmars-d mailing list