[Issue 11123] New: std.getopt should support functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 25 06:12:17 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11123

           Summary: std.getopt should support functions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-09-25 06:12:16 PDT ---
Currently getopt works with delegates, but not functions:

-----
import std.getopt;

void main(string[] args)
{
    static void test1(string)
    {
    }

    void test2(string)
    {
    }

    getopt(args,
        "test1", &test1,  // fails
        "test2", &test2);
}
-----

AFAICT I don't see any technical reason why functions shouldn't be supported.

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


More information about the Digitalmars-d-bugs mailing list