@@ -51,11 +51,11 @@ Options::Options(const std::string& command, const std::string& description)
5151 : debug(false ), positional(Arguments::Zero) {
5252 add (" --help" , " -h" , " Show this help message and exit" , Arguments::Zero,
5353 [this , command, description](Options* o, const std::string&) {
54- std::cerr << command;
55- if (positional != Arguments::Zero) std::cerr << ' ' << positionalName;
56- std::cerr << " \n\n " ;
57- printWrap (std::cerr , 0 , description);
58- std::cerr << " \n\n Options:\n " ;
54+ std::cout << command;
55+ if (positional != Arguments::Zero) std::cout << ' ' << positionalName;
56+ std::cout << " \n\n " ;
57+ printWrap (std::cout , 0 , description);
58+ std::cout << " \n\n Options:\n " ;
5959 size_t optionWidth = 0 ;
6060 for (const auto & o : options) {
6161 optionWidth =
@@ -64,12 +64,12 @@ Options::Options(const std::string& command, const std::string& description)
6464 for (const auto & o : options) {
6565 bool long_n_short = o.longName .size () != 0 && o.shortName .size () != 0 ;
6666 size_t pad = 1 + optionWidth - o.longName .size () - o.shortName .size ();
67- std::cerr << " " << o.longName << (long_n_short ? ' ,' : ' ' )
67+ std::cout << " " << o.longName << (long_n_short ? ' ,' : ' ' )
6868 << o.shortName << std::string (pad, ' ' );
69- printWrap (std::cerr , optionWidth + 4 , o.description );
70- std::cerr << ' \n ' ;
69+ printWrap (std::cout , optionWidth + 4 , o.description );
70+ std::cout << ' \n ' ;
7171 }
72- std::cerr << ' \n ' ;
72+ std::cout << ' \n ' ;
7373 exit (EXIT_SUCCESS);
7474 });
7575 add (" --debug" , " -d" , " Print debug information to stderr" , Arguments::Zero,
0 commit comments