Is there a way to change how boost :: program_options formats the default value for parameters in the help text program_options::options_description (which can be obtained via cout << description )? In particular, I have default values ββthat are floats, so a regular decimal binary conversion gives me a help text that looks like --arg (0.100000001) , which is pretty ugly.
Using cout << setprecision(4) does not work, because program_options << 'itself is the default value for some internal streams for formatting in the first place (at least what I understood by looking at the source code), and what gets << 'ed before cout is the resulting string (stream?).
Thanks.
source share