We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6a5faf commit cad5e0bCopy full SHA for cad5e0b
include/cppcommandline.h
@@ -514,6 +514,7 @@ class Parser
514
515
for (const Option& option : mOptions)
516
{
517
+ {
518
std::ostringstream str;
519
520
if(option.isPositional())
@@ -522,8 +523,10 @@ class Parser
522
523
str << " -" << option.shortName() << ", --" << option.longName();
524
525
std::cout << std::left << std::setw(25) << str.str();
526
+ }
527
- str = std::ostringstream();
528
529
+ std::ostringstream str;
530
531
if(option.isRequired())
532
str << "[required]";
@@ -533,6 +536,7 @@ class Parser
533
536
str << "[optional]";
534
537
535
538
std::cout << std::setw(20) << str.str() << option.description() << std::endl;
539
540
}
541
542
std::cout << std::endl;
0 commit comments