[Issue 2159] Confusion between function call and C++ style function address

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 25 16:19:10 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=2159

--- Comment #13 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to anonymous4 from comment #11)
> Self-contained test case:
> ---
> void f(int);
> void f(int function());
> int g();
> void h()
> {
>     f(g);
>     f(&g);
> }
> ---

I don't get it. This code compiles just fine, as it should. f(g) call s f(int)
and f(&g) calls f(int function()). This seems reasonable to me.

--


More information about the Digitalmars-d-bugs mailing list