Boost C++ Libraries: Ticket #821: allow_unregistered improvement https://svn.boost.org/trac10/ticket/821 <pre class="wiki">po::variables_map vm; po::parsed_options parsed = po::command_line_parser(argc, argv).options(cmdline_options).allow_unregistered().run(); po::remove_unrecognized(parsed); po::store(parsed, vm); namespace boost { namespace program_options { template &lt;class T&gt; bool is_unrecognized ( T &amp;value ) { return value.unregistered; } template &lt;class T&gt; void remove_unrecognized_options(T &amp;op) { T::iterator end=std::remove_if(op.begin(),op.end(),is_unrecognized&lt;T::value_type&gt;); op.erase(end,op.end()); } template &lt;class T&gt; void remove_unrecognized(T &amp;op) { remove_unrecognized_options(op.options); } } } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/821 Trac 1.4.3 Steven Watanabe Sun, 04 Jan 2009 04:53:32 GMT component changed; severity set https://svn.boost.org/trac10/ticket/821#comment:1 https://svn.boost.org/trac10/ticket/821#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">functional</span> → <span class="trac-field-new">program_options</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Showstopper</span> </li> </ul> Ticket Steven Watanabe Sun, 04 Jan 2009 04:54:12 GMT owner, status changed https://svn.boost.org/trac10/ticket/821#comment:2 https://svn.boost.org/trac10/ticket/821#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">mark_rodgers</span> to <span class="trac-author">Vladimir Prus</span> </li> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket Vladimir Prus Thu, 04 Jun 2009 10:11:57 GMT status, resolution changed https://svn.boost.org/trac10/ticket/821#comment:3 https://svn.boost.org/trac10/ticket/821#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> I do not think this is now necessary, given that 'store' ignores unrecognized options itself. </p> Ticket