Pointers to non-static member functions!
Michel Fortin
michel.fortin at michelf.com
Wed Jun 8 10:02:55 PDT 2011
On 2011-06-08 09:24:43 -0400, "Daniel Murphy" <yebblies at nospamgmail.com> said:
> This would be nice to have, but the compiler would need to use a different
> calling convention or generate multiple function beginnings, as the this
> parameter must be passed last.
True. What I mean is that a function type should know whether it needs
a 'this' pointer or not, and implicit conversion between a function
type that needs a this pointer and one that doesn't need one should be
forbidden. And calling such a function directly would either not work,
or would require a 'this' to be provided as the first argument (which
is then put at the right place according to the ABI rules).
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list