When using boost::program_options
, how do I set the name of an argument for boost::program_options::value<>()
?
#include <iostream>
#include <boost/program_options.hpp>
int main()
{
boost::program_options::options_description desc;
desc.add_options()
("width", boost::program_options::value<int>(),
"Give width");
std::cout << desc << std::endl;
return 0;
}
The above code gives:
--width arg Give width
What I want is to replace the arg
name with something more descriptive like NUM
:
--width NUM Give width