Skip to content

Commit cad5e0b

Browse files
committed
Fixed issue with GCC<5.0
1 parent e6a5faf commit cad5e0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/cppcommandline.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ class Parser
514514

515515
for (const Option& option : mOptions)
516516
{
517+
{
517518
std::ostringstream str;
518519

519520
if(option.isPositional())
@@ -522,8 +523,10 @@ class Parser
522523
str << " -" << option.shortName() << ", --" << option.longName();
523524

524525
std::cout << std::left << std::setw(25) << str.str();
526+
}
525527

526-
str = std::ostringstream();
528+
{
529+
std::ostringstream str;
527530

528531
if(option.isRequired())
529532
str << "[required]";
@@ -533,6 +536,7 @@ class Parser
533536
str << "[optional]";
534537

535538
std::cout << std::setw(20) << str.str() << option.description() << std::endl;
539+
}
536540
}
537541

538542
std::cout << std::endl;

0 commit comments

Comments
 (0)