On Monday, 14 April 2014 at 17:45:52 UTC, Ryan Voots wrote:
/**
 * Convert any function pointer to a delegate.
 * _ From: http://www.digitalmars.com/d/archives/digitalmars

You can replaced it with std.functional.toDelegate.

As for its use-case, if some API or function supports only delegates but you want to pass in a function, you would wrap the function with toDelegate and then pass the delegate to the API/function.

Reply via email to