[Issue 7725] Implicit function pointer cast

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 9 08:42:00 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=7725



--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-11-09 08:41:58 PST ---
(In reply to comment #3)
> Oh look, this again.
> 
> *** This issue has been marked as a duplicate of issue 3075 ***

We could however implement this as a safe feature for to!():

-----
import std.conv;

void call(void function(int) f) {}
void foo(in int) {}

void main()
{
    call(to!(void function(int))(&foo));
}
-----

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list