When using boost::program_options, how does one set the name of the argument?

后端 未结 6 1764
借酒劲吻你
借酒劲吻你 2021-02-01 18:02

When using boost::program_options, how do I set the name of an argument for boost::program_options::value<>()?

#include 

        
6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-01 18:42

    The approach given by Codebender is the only one you can use. This is actually intentional -- using "NUM" for name of argument appears to be micro-optimization that is not worth doing. A good description of the option should also say what kind of argument is expected.

提交回复
热议问题