[Boost-bugs] [Boost C++ Libraries] #3361: [Program Options] Bug: empty arguments treated as positional ones

Subject: [Boost-bugs] [Boost C++ Libraries] #3361: [Program Options] Bug: empty arguments treated as positional ones
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-08-24 00:19:55


#3361: [Program Options] Bug: empty arguments treated as positional ones
---------------------------------------------------+------------------------
 Reporter: k-r.ernst@… | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: program_options
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: program options whitespace positional |
---------------------------------------------------+------------------------
 Tested with boost::program_options in 1.39

 When an program argument is empty, or contains only whitespace, it it
 treated as positional argument, confusing program_options

 How to reproduce:

 1. Get example app which expects 1 positional argument

 2. launch it with e.g. execlp("testapp", "testapp", "",
 "real_positional_argument", NULL);

 Observed behavior:
 Error: "too many positional options"

 Expected behavior:
 Empty argument should be ignored

 Additional note:
 instead of empty string "", the same error happens with only whitespace
 like " "

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3361>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC