
30 Jul
2008
30 Jul
'08
5:01 p.m.
Hello I have boost.program_options implemented inside a config class. I want to call function (my_function) that is a member of config class for specific option (with notifier call). class config_class { public: void read_config() { po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ("include-path,I", po::value< vector<string>
()->notifier(&config_class::my_function), "include path"); }
void my_function(vector<std::string> str) { } }; This wont compile and will give error for ..>()->notifier(&config_class::my_function)...
error C2064: term does not evaluate to a function taking 1 arguments
What am I doing wrong? Many thanks in advance! Aljaz