Ticket #3525: patch_ticket3525.diff

File patch_ticket3525.diff, 1.1 KB (added by s.ochsenknecht@…, 13 years ago)

patch

  • example/response_file.cpp

     
    2828#include <fstream>
    2929using namespace std;
    3030
     31
     32
    3133// Additional command line parser which interprets '@something' as a
    3234// option "config-file" with the value "something"
    3335pair<string, string> at_option_parser(string const&s)
     
    7072            ss << ifs.rdbuf();
    7173            // Split the file content
    7274            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);
    7477            vector<string> args;
    7578            copy(tok.begin(), tok.end(), back_inserter(args));
    7679            // Parse the file and store the options
     
    8689        if (vm.count("magic")) {
    8790            cout << "Magic value: " << vm["magic"].as<int>() << "\n";
    8891        }
    89     }
    90     catch(exception& e) {
     92    } catch(std::exception& e) {
    9193        cout << e.what() << "\n";
    9294    }
    9395}