()->default_value("true")); How do I use flag m in comman" /> ()->default_value("true")); How do I use flag m in comman" /> ()->default_value("true")); How do I use flag m in comman"/>

How to use boolean flag with cxxopts and command line?

90 views Asked by At

I defined:

options.add_options()
  ("m, monitor", "Monitor current state", cxxopts::value<bool>()->default_value("true"));

How do I use flag m in command line to run test executable on Linux?

This:

./test -m "false"
./test -m false

doesn't work.


My case has true as default value for m and I want to run test with m having false value. Is it possible?

0

There are 0 answers