Boolean arguments should be used with care. It s easy ... of an argument. operator bool() is a shortcut for HasValue () method which checks if any value was set either ... is true , The best approach if (args optkey HasValue () args optkey .AsBoolean()) { Flag arguments have different behavior: HasValue () , operator bool() and AsBoolean() always return ... there), and asn2asn.cpp for more examples.
...