Subject: [Boost-bugs] [Boost C++ Libraries] #9630: Program Options: canonical option name incorrect when hyphenated
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-04 16:48:24
#9630: Program Options: canonical option name incorrect when hyphenated
-----------------------------------------+-----------------------------
Reporter: Tad Ashlock <tad.ashlock@â¦> | Owner: vladimir_prus
Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
Version: Boost 1.55.0 | Severity: Problem
Keywords: |
-----------------------------------------+-----------------------------
When using a long option name like "external-device", if there is a
problem, the name of the option in the error message is printed as "--
device" instead of "--external-device". This is due to the implementation
in error_with_option_name::get_canonical_option_name() in the
value_semantic.cpp file. It calls strip_prefixes() when assigning the
value to original_token. But strip_prefixes() simply uses
find_last_of("-/"), which finds the dash within the option name and
incorrectly uses the following character as the start of the option name.
I don't know the proper fix to apply in order to not cause errors in other
uses of these functions.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9630> 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:15 UTC