Skip to content

Commit f1b7a75

Browse files
author
Fytch
committed
examples: fix alignment
1 parent 5e78cab commit f1b7a75

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

examples/4 sum.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
int main(int argc, char** argv) {
66
po::parser parser;
77

8-
auto&& x = parser[""] // the unnamed parameter
8+
auto&& x = parser[""] // the unnamed parameter
99
.type(po::f64) // expects 64-bit floating point numbers
10-
.multi() // allows multiple arguments
10+
.multi() // allows multiple arguments
1111
.fallback(-8, "+.5e2") // if no arguments were provided, assume these as default
1212
.callback([&]{ std::cout << "successfully parsed "; })
1313
.callback([&](std::string const& x){ std::cout << x; })

examples/5 bind.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@ int main(int argc, char** argv) {
99
po::parser parser;
1010

1111
std::uint32_t optimization = 0; // the value we set here acts as an implicit fallback
12-
parser["optimization"] // corresponds to --optimization
13-
.abbreviation('O') // corresponds to -O
12+
parser["optimization"] // corresponds to --optimization
13+
.abbreviation('O') // corresponds to -O
1414
.description("set the optimization level (default: -O0)")
1515
.bind(optimization); // write the parsed value to the variable 'optimization'
1616
// .bind(optimization) automatically calls .type(po::u32) and .single()
1717

1818
std::vector<std::string> include_paths;
19-
parser["include-path"] // corresponds to --include-path
20-
.abbreviation('I') // corresponds to -I
19+
parser["include-path"] // corresponds to --include-path
20+
.abbreviation('I') // corresponds to -I
2121
.description("add an include path")
2222
.bind(include_paths); // append paths to the vector 'include_paths'
2323

24-
parser["help"] // corresponds to --help
25-
.abbreviation('?') // corresponds to -?
24+
parser["help"] // corresponds to --help
25+
.abbreviation('?') // corresponds to -?
2626
.description("print this help screen");
2727

2828
std::deque<std::string> files;
29-
parser[""] // the unnamed parameter is used for non-option arguments, i.e. gcc a.c b.c
29+
parser[""] // the unnamed parameter is used for non-option arguments, i.e. gcc a.c b.c
3030
.bind(files); // append paths to the deque 'include_paths
3131

3232
// parsing returns false if at least one error has occurred

0 commit comments

Comments
 (0)