Boost logo

Boost Users :

Subject: [Boost-users] [Program Options] notifiers for options with no value
From: Dmitriy Matison (matison.d_at_[hidden])
Date: 2011-08-29 07:16:35


Hello,

I'm wondering if there is a possibility to make program_options library to
notify me automatically when option with no value is passed?
As far as I understand this feature exists only for options with defined
value_semantic. But this means I must permit passing a value for such
options. Say, I make an option with zero_tokens() semantics so it can be
passed without value and throw an error if some value was provided.
Unfortunately, this doesn't solve the problem if you have positional
options. In that case a positional option following a no-value option will
be parsed as this option's value.
I can't set notifier for options with no value? This is something not
understandable. I even think of some patch to be added to the lib.

Regards,
Dmitriy.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net