diff options
author | Jarryd Beck <jarro.2783@gmail.com> | 2018-03-08 00:53:26 +0300 |
---|---|---|
committer | Jarryd Beck <jarro.2783@gmail.com> | 2018-03-08 00:53:26 +0300 |
commit | e40645e0849b57976f5066b4e45d65253947e461 (patch) | |
tree | ba211a8c0fdc8a6687da315f3dc48676abade414 /src | |
parent | 76bd60dc17ca514f2febb49382b38d526d5502a5 (diff) |
Don't show default when boolean false
Fixes #102. Don't show the default value when it is a boolean and the
value is false. Note that this is a bit of a hack and the
implementation should probably be reevaluated in the future.
Diffstat (limited to 'src')
-rw-r--r-- | src/example.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/example.cpp b/src/example.cpp index b541774..64709f2 100644 --- a/src/example.cpp +++ b/src/example.cpp @@ -40,6 +40,7 @@ int main(int argc, char* argv[]) options.add_options() ("a,apple", "an apple", cxxopts::value<bool>(apple)) ("b,bob", "Bob") + ("t,true", "True", cxxopts::value<bool>()->default_value("true")) ("f, file", "File", cxxopts::value<std::vector<std::string>>(), "FILE") ("i,input", "Input", cxxopts::value<std::string>()) ("o,output", "Output file", cxxopts::value<std::string>() |