Boost logo

Boost Users :

Subject: Re: [Boost-users] problem with boost::program_options
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-06-25 10:16:04


Hasanul Ferdaus wrote:

> Hi,
> I am trying to parse unregistered options using  boost::program_options for config files but it
> does not recognize the unregistered options. the code is like to the following -
> -------------------------------- boost::program_options::options_description *optionsDescription;
> boost::program_options::variables_map *variablesMap;
> optionsDescription->add_options()
> ("ariba.bootstrap.hints", "Bootstrap Hints");
>
> std::ifstream ifs(configFileName.c_str());
> store(parse_config_file(ifs, *optionsDescription, true), *variablesMap);
> notify(*variablesMap);
> ----------------------------------
>
> As it says, passing true to the 3rd argument of parse_config_file() should allow unregistered
> options to be parsed, but it does not recognize any unregistered options in config file.

Can you explain exactly what do you mean by "it does not recognize any unregistered options",
and provide a self-contained example of the problem?

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net