Boost program_options with composing() and implicit_value() are not “composed”
问题 I am having a problem with boost program_options (v1_49) in the case of an option defined as composing() and also implicit(). My intent is to implement a -D option similar to the way perl does, so that you can do -D or -Dname and use it multiple times. My options_description is: ( "debug,D", bpo::value<vector<string> >() ->composing() ->implicit_value(vector<string>(1,"1")), "Set debug level." ), This seems to work OK in most cases, but whenever -D with no value appears on the command line,