$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Dale McCoy (dalestan_at_[hidden])
Date: 2006-04-22 21:15:51
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