8 Aug
2008
8 Aug
'08
12:42 p.m.
Aljaz wrote:
Hello
I've been wondering how its possible to call a notifier function with an option that doesnt require arguments.
Something like: po::options_description desc("Allowed options"); desc.add_options() ("help", po::value<>()->notifier(&_help_function), "produce help message"); Whats the proper way of doing this?
("help", po::value<>()->notifier(boost::bind(_help_function)), "produce help The functional object produced by boost::bind will take any number of arguments, up to a fixed amount, and will discard those that the wrapped function would not take. - Volodya