Subject: [Boost-bugs] [Boost C++ Libraries] #11645: basic_option::basic_option(2) misses initialization for position_key
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-09-11 15:44:00
#11645: basic_option::basic_option(2) misses initialization for position_key
------------------------------+-----------------------------
Reporter: bernd.loerwald@⦠| Owner: vladimir_prus
Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
Version: Boost 1.59.0 | Severity: Problem
Keywords: |
------------------------------+-----------------------------
The {{{basic_option(const std::string& xstring_key, const std::vector<
std::string> &xvalue)}}} overload in
[https://github.com/boostorg/program_options/blob/develop/include/boost/program_options/option.hpp#L31
option.hpp:31] does not initialize the {{{position_key}}} member, while
the default ctor does.
When having an {{{extra_style_parser}}} and positional options the options
that were removed by the {{{extra_style_parser}}} are considered
positional, unless the {{{extra_style_parser}}} explicitely sets
{{{position_key = -1}}}.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11645> 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:19 UTC