I noticed some recent activity on the list by the author of
boost::program_options, so I'm posting this one more time.
Thank you.
MD
Date: Fri, 28 Jul 2006 10:22:54 -0700
From: "Drumheller, Michael"
Subject: Re: [Boost-users] Question about
program_options
To:
Content-Type: text/plain; charset="us-ascii"
Just a follow up: I did not receive any response to my
query below (neither from the list, nor from the library author, whom I
attempted to contact directly).
Can anyone give me an idea of the general status of
boost::program_options? Is it still being maintained? Am I the only
person using it ? :)
Thanks,
MD
> _____________________________________________
> From: Drumheller, Michael
> Sent: Friday, July 21, 2006 9:06 AM
> To: 'boost-users@lists.boost.org'
> Subject: Question about program_options
>
> Regarding boost::program_options:
>
> I would like to parse (and then store) some
command-line options that
> potentially contain unregistered flags, and I
understand from
>
<http://www.boost.org/doc/html/program_options/howto.html#id2716386>
> that the way to do this is:
>
> basic_command_line_parser<char> parser(argc, argv);
> basic_parsed_options<char>
>
parsed(parser.options(options).allow_unregistered().run());
>
> Indeed this works--for parsing. But how do I store
the resulting
> parsed options (in a way that ignores the unregistered
ones)? Simply
> calling
>
> store(parsed, vm);
>
> throws a boost::program_options::unknown_option
exception. I can take
> the (brute force) step of erasing from parsed.options
all elements for
> which the unregistered attribute is true, and then
calling
> store(parsed, vm). That seems to work, but it so
clumsy that it makes
> me think I'm using the system in a way that was not
intended.
>
> Can anyone help?
>
> Thank you.
>
> MD
>
> P.S. There is a bug in the doc:
"collect_arguments(...)" on the last
> line of the above link should be
collect_unrecognized(...); similarly,
> in the source code parsers.hpp (line 158) there is a
mention of the
> nonexistent function "collect_unregistered").
>
> Michael Drumheller
> Boeing Phantom Works
> Mathematics and Engineering Analysis
> 425.865.3520 michael.drumheller@boeing.com This email
may contain
> proprietary information. If you are not the intended
recipient please
> delete it and notify the sender that you received it
in error.