Boost C++ Libraries: Ticket #3361: [Program Options] Bug: empty arguments treated as positional ones https://svn.boost.org/trac10/ticket/3361 <p> Tested with boost::program_options in 1.39 </p> <p> When an program argument is empty, or contains only whitespace, it it treated as positional argument, confusing program_options </p> <p> How to reproduce: </p> <ol><li>Get example app which expects 1 positional argument </li></ol><ol start="2"><li>launch it with e.g. execlp("testapp", "testapp", "", "real_positional_argument", NULL); </li></ol><p> Observed behavior: Error: "too many positional options" </p> <p> Expected behavior: Empty argument should be ignored </p> <p> Additional note: instead of empty string "", the same error happens with only whitespace like " " </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3361 Trac 1.4.3 Vladimir Prus Mon, 24 Aug 2009 07:14:39 GMT <link>https://svn.boost.org/trac10/ticket/3361#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3361#comment:1</guid> <description> <p> Could you provide a rationale for ignoring tokens that are either empty strings or whitespace-only? Why are such tokens are passed to the program in the first place? What other programs ignore such tokens? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sat, 29 Aug 2009 07:44:20 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3361#comment:2 https://svn.boost.org/trac10/ticket/3361#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">invalid</span> </li> </ul> <p> Since you did not provide any rationale, I am closing this bug. Of course, should you wish to follow up, please reopen it. </p> Ticket