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

Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #12 from Steven Schveighoffer <[email protected]> ---
Isn't this the type/pointer assigned to delegates?

e.g.:

S s;
auto dg = &s.fun;
assert(dg.funcptr == &S.fun);

So it could be useful if you are doing something funky with the function
pointer portion of a delegate. Like for instance, selecting at runtime which
function pointer to use.

My preference would be to embed in the type of the function pointer, the fact
that it takes a hidden context pointer. Then the compiler can disallow simply
calling it without stuffing it into a delegate.

--

Reply via email to