Subject: Re: [boost] Using Program Options styles to format options_description output
From: Arindam Mukherjee (arindam.mukerjee_at_[hidden])
Date: 2014-05-24 15:26:31
On Fri, May 23, 2014 at 11:08 AM, Arindam Mukherjee
> One of the things I want to do when I use Program Options is to print
> the help according to the styles I am enforcing. For example, on
> Windows if I use allows_slash_for_short, it will make sense for me to
> reflect that when I print the actual help string. I can't find a way
> to do this. Any pointers?
I noticed that the option_description::format_name() method, which is
called to format each option while streaming the help message, hard
codes the leading characters of the long and short options and as a
result there is no way to print the description based on the style I
am enforcing. This seems like a serious bug to me. If I am using a
style in which options are introduced with a leading forward slash
(which is supported) or long options are introduced with a single
rather than double hyphen (which too is supported), then I'll end up
printing misleading description.
I'll try to patch this in my private build without breaking existing
interfaces. Would be keen to know if there would be any general
interest in such a patch.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk