I have the following options_description:
po::options_description config("Configuration File or Command Line");
config.add_options()
("run-time,t", po::value<double>(&runTime_)->default_value(1440.0), "set max simulation duration")
("starting-iteration,i", po::value<long>(&startingIteration_)->default_value(1), "set starting simulation iteration")
("repetitions,r", po::value<long>(&repetitions_)->default_value(100), "set number of iterations")
...
;
As you can see the three shown have a long,short names employed. The long versions all work. However, none of the short ones do, and each time I try a -t 12345.0
or a -i 12345
, etc., I get the following from Program_Options:
std::logic_error: in option 'starting-iteration': invalid option value
I'm using Boost 1.42 on Win32. Any thoughts on what might be going on here? Thanks!