Hello, I'm wondering if I should use boost::program_options and I got some questions about it.

All examples that I found are using std::string and std::ostream everytime they're dealing with values being some kind of text...

so to display the "usage" of their program they would do something like...

cout << desc;

'desc' being a boost::program_options::options_description.

or...

when adding options to their command line...

desc.add_options()
                          ...
                          ("opt", boost::program_options::value<std::string>, "desc")
                          ...


What I want to know is, if I didn't want to use std::string nor std::ostream nor std anything in my specific code (I know boost uses it).

Is there a not-so-time-expensive way to do it? If there's could someone show me (there's no need for the real code, pseudo is more than OK) if it's supported?

something like this for example...

desc.add_options() ("opt", bpo::value<char*>, "blabla")

and in usage()-like:

I don't know if this works, I looked in doc...
std::vector< shared_ptr<po::option_description> > opts = desc.options();
std::vector< shared_ptr<po::option_description> >::iterator it = opts.begin();
for (; it != opts.end(); ++it)
{
     shared_ptr<po::option_description> opt = *it;
     printf("%s\n", opt->format_parameter().c_str());
}


Patuti