Help the old man learn D

Charles Hawkins via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 26 23:43:12 PDT 2015


On Friday, 26 June 2015 at 17:11:54 UTC, Marc Schütz wrote:
> On Friday, 26 June 2015 at 16:57:14 UTC, Charles Hawkins wrote:
>>[...]
>
> I don't fully understand what you're doing, but functions can 
> easily be turned into delegates using std.functional.toDelegate 
> [1]:
>
>     import std.functional : toDelegate;
>     registerDelegate((&topLevelFunction).toDelegate);
>
> [1] http://dlang.org/phobos/std_functional.html#.toDelegate

Thanks, Marc.  That should work if my brute force duplicate code 
doesn't.

Thanks to everyone, at long last my project compiles with dmd.  
It crashes right away, but that's not unexpected since I haven't 
used pointers in several years.  Unfortunately, compiling with 
gdc spits out a bunch of errors regarding getopt so I'm back to 
sprinkling log statements to find the problem.


More information about the Digitalmars-d-learn mailing list