Method pointers are *function* pointers?? Or delegates??

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri May 18 11:30:46 PDT 2012


On 5/18/12 1:22 PM, Mehrdad wrote:
> My brain just exploded.
> Can someone explain what's going on?
>
> class Test
> {
> public void foo() { }
> }
>
> static assert(is(typeof(&Test.foo) == void function()));

Looks like a bug. The assert should pass only if foo were static.

Andrei


More information about the Digitalmars-d mailing list