[Boost-bugs] [Boost C++ Libraries] #3775: collect_unrecognized cannot find unrecognized options from parse_config_file

Subject: [Boost-bugs] [Boost C++ Libraries] #3775: collect_unrecognized cannot find unrecognized options from parse_config_file
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-12-17 21:12:52


#3775: collect_unrecognized cannot find unrecognized options from
parse_config_file
---------------------------------------------------+------------------------
 Reporter: Rhys Ulerich <rhys.ulerich@…> | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: |
---------------------------------------------------+------------------------
 program_options::collect_unrecognized does not properly collect
 unregistered options parsed via parse_config_file when parse_config_file
 is set to accept unregistered options.

 Test case attached as test.cpp.

 Compare the number of options that have unregistered == true vs the number
 of elements in recognized. I expect that the number of unregistered
 options is identical to the number of unrecognized options collected based
 upon
 [http://www.boost.org/doc/libs/1_40_0/doc/html/boost/program_options/collect_unrecognized.html
 the documentation].

 It looks like parse_config_file fails to set
 basic_option<charT>.original_tokens correctly, and collect_unrecognized
 seems to rely on the original_tokens to do its job. The trouble involves
 boost/program_options/detail/parsers.hpp:135 where the std::copy call is a
 NOP but should not be.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3775>
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:02 UTC