[program_options] Deprecating 'implicit' and 'multitoken' options

Hello, the program options library allows to mark an option as "implicit". That mean that specifying a value on the command line is optional. One can write either --someoption foo or --someoption --someotheroption In the first case, the --someoption has a value 'foo', and in the second case, it has no explicit value. This behaviour is tricky -- we try to look at the next token and figure out if it's option or not. In particular, we'll fail for the case of --someoption -1 and we'll also fail for the case where the token following "--someoption" is an option recognized by the user-provided "additional parser". I would like to deprecate the 'implicit' options and eventually remove them. Another alternative is to require that value for implicit options is specified in the same token: --someoption=foo Another problem is with the "multitoken" options. Those are options which allow the value to span several tokens on the command line. Again, we need to check, for each token, if it looks like option or like value, and this is tricky. I'd like to deprecate this behaviour as well. Any objections? - Volodya

Vladimir Prus wrote:
--someoption -1
IMHO, it is absolutely required that there be a method to give negative numbers as values without confusing them for options. I don't see the "implicit" behaviour as being a high priority, as long as boolean switch behaviour without values is available. That is, you want to support --verbose Where verbose is a boolean switch that does not take an optional value.
participants (2)
-
Neal Becker
-
Vladimir Prus