Boost logo

Boost Users :

Subject: [Boost-users] [program_options] separating long name and short name
From: svarneticist (svarneticist_at_[hidden])
Date: 2009-06-23 19:26:40


Hello,

I would like to store an option name in a variable and later use it with
variables_map. E.g.

const char* incl = "include-path";
options_description desc;
desc.add_options()(incl, "include path");
variables_map vm;
store(parse_command_line(argc, argv, desc), vm);
if(vm.count(incl)) {
...
}

But if I also want to specify a short name
const char* incl = "include-path,i";
...
The answer here is always zero:
vm.count(incl)

Is there a way to add a short name separately?

Thank you

Mikhail


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