getopt and tuples

swadenator swadenator at gmail.com
Sat Feb 2 08:58:57 PST 2008


Hi all,

I'm trying to make use of std.getopt by wrapping it with a class that handles usage printing and reading from a configuration file.  Previously, in C++, would construct an array of "struct option" for getopt_long_only().

Is there a way to do something similar in D?  Looking through the std.getopt code it seems that the variable argument list needed by getopt() is really implemented as a template with a tuple argument, but I'm not sure if my class can construct this tuple at runtime to call getopt.  Any ideas would be appreciated!

thanks in advance,
wade


More information about the Digitalmars-d-learn mailing list