$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-08-08 08:42:08
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