getopt that automatically prints usage

Andrei Alexandrescu SeeWebsiteForEmail at
Sun Feb 7 18:41:39 PST 2010

Igor Lesik wrote:
> I like how boost program_options library allows to keep together options and 
> the help strings and automatically generate help message. So I did something 
> similar by writing a wrapper around std.getopt.getopt that automatically 
> generates help/usage message; just would like to share it; may be something 
> like that could be added into std.getopt in future.
> here is an example and code: 

Beautiful. Thanks Igor. I created this report so I don't forget to add 
your code:

When I get to it I'll integrate your code and add your name to the 
authors. I wanted to add such functionality for a long time, but I 
didn't think it will be this easy. Your solution is very elegant.


More information about the Digitalmars-d-announce mailing list