mirror of
https://github.com/boostorg/program_options.git
synced 2026-01-19 04:22:15 +00:00
Add a new option to response_file.cpp to illustrate that options in
response files are overriden by options on the command line. [SVN r26678]
This commit is contained in:
@@ -46,6 +46,7 @@ int main(int ac, char* av[])
|
||||
("help", "produce a help message")
|
||||
("include-path,I", value< vector<string> >()->composing(),
|
||||
"include path")
|
||||
("magic", value<int>(), "magic value")
|
||||
("response-file", value<string>(),
|
||||
"can be specified with '@name', too")
|
||||
;
|
||||
@@ -82,6 +83,9 @@ int main(int ac, char* av[])
|
||||
copy(s.begin(), s.end(), ostream_iterator<string>(cout, " "));
|
||||
cout << "\n";
|
||||
}
|
||||
if (vm.count("magic")) {
|
||||
cout << "Magic value: " << vm["magic"].as<int>() << "\n";
|
||||
}
|
||||
}
|
||||
catch(exception& e) {
|
||||
cout << e.what() << "\n";
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
-I bar
|
||||
-I biz
|
||||
-I biz
|
||||
--magic 10
|
||||
Reference in New Issue
Block a user