Boost logo

Boost :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2007-01-24 01:58:12

This works for me in CVS.

-----Original Message-----
From: boost-bounces_at_[hidden] on behalf of Peng Yu
Sent: Tue 1/23/2007 8:33 PM
To: boost_at_[hidden]
Subject: [boost] program_options: Why it throw ambiguous_option?

I got the following error for the program list below. Where
program_options considers "help" and "help_abc" as ambiguous?

$ ./main --help
terminate called after throwing an instance of
 what(): ambiguous option help


#include <boost/program_options.hpp>
namespace po = boost::program_options;

int main(int ac, char* av[])
 po::options_description desc("Allowed options");
   ("help", "produce help message")
   ("help_abc", po::value<int>(), "set compression level")

 po::variables_map vm;
 po::store(po::parse_command_line(ac, av, desc), vm);

 return 0;
Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at