Boost C++ Libraries: Ticket #4541: Options starting with "opt_" not recognized by command line parser https://svn.boost.org/trac10/ticket/4541 <p> Hello, </p> <p> I have a strange problem when using boost::program_options. Options whose name starts with "opt_" seem to be ignored by the command line parser. I tried to declare an option of type string with name "opt_method". If I enter the command line parameter --opt_method='foo', the option value 'foo' is not present afterwards (the value is still equal to the default value, if any is declared). The parameter is read correctly when using a configuration file, however. </p> <p> Moreover, if I do NOT declare an option with this name, but still enter the command line parameter, there is no boost::program_options::unknown_option exception thrown. As soon as I change the name of the option to "optmethod" or "method", the problems are gone. </p> <p> Best regards, Peter </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4541 Trac 1.4.3 Peter Hepperger <hepperger@…> Sat, 14 Aug 2010 17:18:17 GMT <link>https://svn.boost.org/trac10/ticket/4541#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4541#comment:1</guid> <description> <p> Another test showed that this is due to the bug described in ticket/545 (I had second option starting with "opt_"). Hence, this is probably already fixed in the trunk version of boost. </p> </description> <category>Ticket</category> </item> <item> <author>Peter Hepperger <hepperger@…></author> <pubDate>Sat, 14 Aug 2010 17:20:51 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4541#comment:2 https://svn.boost.org/trac10/ticket/4541#comment:2 <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-new">duplicate</span> </li> </ul> Ticket