boostorg / boostorg/program_options
Program options default has unreasonable precision
- Dominant language
- C++
- Stars
- 136
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Description
Source code:
``` int i,e,t,d;
time_t now,then;
double tolerance,stageTolerance,areadone,rmsadj;
bool done=false;
string inputFile,outputFile;
bool validArgs,validCmd=true;
po::options_description generic("Options");
po::options_description hidden("Hidden options");
po::options_description cmdline_options;
po::positional_options_description p;
po::variables_map vm;
generic.add_options()
("tolerance,t",po::value(&tolerance)->default_value(0.1),"Vertical tolerance")
("output,o",po::value(&outputFile),"Output file");
hidden.add_options()
("input",po::value(&inputFile),"Input file");
p.add("input",1);
cmdline_options.add(generic).add(hidden);
//...
cout<
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the formatting with the shown Boost.Program_options configuration and inspect how default_value formats a double for the displayed option description. Compare the behavior with ldecimal.cpp in the linked bezitopo project, while preserving the requested 0.1 form rather than .1. Done means the default is displayed as (=0.1) without breaking other option output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100