Re: [Boost-bugs] [Boost C++ Libraries] #1132: zero_tokens doesn't work

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1132: zero_tokens doesn't work
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-04 12:41:30


#1132: zero_tokens doesn't work
---------------------------------------------+------------------------------
 Reporter: Bryan Green <bgreen0@…> | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: program_options
  Version: Boost 1.34.1 | Severity: Problem
 Keywords: |
---------------------------------------------+------------------------------

Comment(by s.ochsenknecht@…):

 I looked a bit deeper to the zero_token() issue. I found out that there is
 implicit_value(...) function which can be used for this feature.
 If an option occurs without any further tokens and this option is allowed
 to stay without any arguments, then this implicit value is assign:

 {{{
     options_description desc;
     desc.add_options()
         ("verbose", value< int >()->implicit_value(1), "verbosity level")
         ;
 }}}

 Anyhow documentation has to be updated and maybe the zero_tokens()
 function needs to be removed. The multitoken() issue is still open.

 Please comment. Thanks.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/1132#comment:9>
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