Ticket #3525: patch_ticket3525.diff
File patch_ticket3525.diff, 1.1 KB (added by , 13 years ago) |
---|
-
example/response_file.cpp
28 28 #include <fstream> 29 29 using namespace std; 30 30 31 32 31 33 // Additional command line parser which interprets '@something' as a 32 34 // option "config-file" with the value "something" 33 35 pair<string, string> at_option_parser(string const&s) … … 70 72 ss << ifs.rdbuf(); 71 73 // Split the file content 72 74 char_separator<char> sep(" \n\r"); 73 tokenizer<char_separator<char> > tok(ss.str(), sep); 75 string sstr = ss.str(); 76 tokenizer<char_separator<char> > tok(sstr, sep); 74 77 vector<string> args; 75 78 copy(tok.begin(), tok.end(), back_inserter(args)); 76 79 // Parse the file and store the options … … 86 89 if (vm.count("magic")) { 87 90 cout << "Magic value: " << vm["magic"].as<int>() << "\n"; 88 91 } 89 } 90 catch(exception& e) { 92 } catch(std::exception& e) { 91 93 cout << e.what() << "\n"; 92 94 } 93 95 }