Opened 7 years ago

Last modified 7 years ago

#11681 new Bugs

Boost 1.59 program_options parsing error

Reported by: mskalick@… Owned by: Vladimir Prus
Milestone: To Be Determined Component: program_options
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description

With boost-1.59 I am seeing the error with parsing options when the options has the implicit value. With boost-1.58 it is working fine. However I am not sure it this is bug or it is intended in boost.

  • argv=["binaryname", "--port", "5"]
  • option port have set default_value=6 and implicit_value=7

What should be the value of port after parsing argv?

After running parser there is an error "Error parsing command line: too many positional options have been specified on the command line".

This problem occurs when running MongoDB test (https://github.com/mongodb/mongo/blob/0481c958daeb2969800511e7475dc66986fa9ed5/src/mongo/util/options_parser/options_parser_test.cpp#L753 ). With boost 1.58 it is passing. Without setting imlicit_value it is passing fine also with 1.59.

Or is this a problem in the test?

Change History (1)

comment:1 by mskalick@…, 7 years ago

Already solved in mailing list - http://lists.boost.org/boost-users/2015/09/85096.php

So this ticket can be closed.

Note: See TracTickets for help on using tickets.