@@ -9,24 +9,24 @@ int main(int argc, char** argv) {
9
9
po::parser parser;
10
10
11
11
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
14
14
.description (" set the optimization level (default: -O0)" )
15
15
.bind (optimization); // write the parsed value to the variable 'optimization'
16
16
// .bind(optimization) automatically calls .type(po::u32) and .single()
17
17
18
18
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
21
21
.description (" add an include path" )
22
22
.bind (include_paths); // append paths to the vector 'include_paths'
23
23
24
- parser[" help" ] // corresponds to --help
25
- .abbreviation (' ?' ) // corresponds to -?
24
+ parser[" help" ] // corresponds to --help
25
+ .abbreviation (' ?' ) // corresponds to -?
26
26
.description (" print this help screen" );
27
27
28
28
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
30
30
.bind (files); // append paths to the deque 'include_paths
31
31
32
32
// parsing returns false if at least one error has occurred
0 commit comments