Re: [Boost-bugs] [Boost C++ Libraries] #4510: [program_options]: implicit_value and positional options conflict

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4510: [program_options]: implicit_value and positional options conflict
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-29 19:49:19


#4510: [program_options]: implicit_value and positional options conflict
--------------------------------------+-----------------------------
  Reporter: Soren Soe <soren.soe@…> | Owner: vladimir_prus
      Type: Bugs | Status: new
 Milestone: Boost 1.44.0 | Component: program_options
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-----------------------------

Comment (by mdecker6@…):

 Is anyone going to fix this? Everything is pretty much as Soren says.

 As for if this was desired, this is not how it is documented and not how
 this typically should behave. That is, options with implicit_values
 should never consume positional options. Never being able to specify a
 value for an implicit value, negates the purpose of implicit values (as
 these can be accomplished with just bool_switch) and there is no other
 option that I can think of to do this.

 Here is the documentation for reference:

 Specifies an implicit value, which will be used if the option is given,
 but without an adjacent value. Using this implies that an explicit value
 is optional, but if given, must be strictly adjacent to the option, i.e.:
 '-ovalue' or '--option=value'. Giving '-o' or `--option' will cause the
 implicit value to be applied.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4510#comment:1>
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:17 UTC