Pointers to non-static member functions!
Daniel Murphy
yebblies at nospamgmail.com
Wed Jun 8 07:13:17 PDT 2011
"Jason House" <jason.james.house at gmail.com> wrote in message
news:isntm4$2ull$1 at digitalmars.com...
>
> Shouldn't it be void function(A)? As long as the ABI supports it, that
> would make the most sense to me... As I understand it, the this pointer is
> just a hidden parameter.
>
Unfortunately the ABI doesn't support it. 'this' must always be the last
parameter, so that kind of conversion would only work for a subset of
functions.
eg.
class A
{
int funcA(int);
}
is equivalent to:
int function(int, A)
and
struct S { int a, b, c; }
class A
{
S funcA(int);
}
is equivalent to:
void function(int, S*, A)
More information about the Digitalmars-d
mailing list