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

后端 未结 6 1833
借酒劲吻你
借酒劲吻你 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条回答
  •  萌比男神i
    2021-02-01 18:55

    One can replace arg with something different via the global variable boost::program_options::arg:

    boost::program_options::arg = "NUM";
    

    But as that is a global variable, it doesn't help much to fix the problem when multiple option might require different arguments.

提交回复
热议问题