#11645 closed Bugs (fixed)
basic_option::basic_option(2) misses initialization for position_key
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | program_options |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The basic_option(const std::string& xstring_key, const std::vector< std::string> &xvalue)
overload in 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
.
Change History (3)
comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Exactly as expected. Wonderful. Thanks for the fast fix. :)
Was there no compiler warning, though? That seems like something trivial to detect.
comment:3 by , 7 years ago
I don't think there were a compiler warning at the normal warning level. I've just tried with VS /W4, and it does not seem to warn either (while producing a pile of spurious warnings).
Thanks for the report, this issue is not fixed in develop. Could you check again please?