23 Apr
2006
23 Apr
'06
1:15 a.m.
I'm trying to convert from getopt (GNU's getopt_long, to be more specific) to boost::program_options, but have run into trouble converting "D::" and {"data",optional_argument,NULL,'D'} (If you're not familiar with getopt, that means that --data is equivalent to -D, and both take an optional argument, so "-D", "--data", "-Darg", and "--data=arg" are all valid.) I see that the first argument to add_option should be "data,D", but then things get fuzzy. I saw nothing in the documentation concerning optional arguments, either directly, or using additional parsers. What is the appropriate method for implementing such options? I'm using currently using Boost 1.33.1. Dale