D1/D2: How to check if a method has been overridden
Jason House
jason.james.house at gmail.com
Tue Sep 7 15:48:03 PDT 2010
That looks like something that should go into bugzilla.
klickverbot Wrote:
> Putting the overloading issue aside for a moment, how would you
> implement it inside a member function of a (which is required for
> various reasons?
>
> The following does *not* work, because &A.foo also performs a vtbl
> lookup when put inside A
>
> ---
> class A {
> void foo() {}
> void bar() {
> auto thisDg = &this.foo;
> writeln(&A.foo is thisDg.funcptr);
> }
> }
> ---
>
> Besides, it also returns a delegate because of this, which is why the
> code does not even compile, but that would be worked around easily.
More information about the Digitalmars-d
mailing list