ArgsManager::GetBoolArg

GetBoolArg overloads

Synopses

Declared in <common/args.h>

Return boolean argument, or std::nullopt if it was not set.

[[requires_capability(0x7f2e381adc28)]]
std::optional<bool>
GetBoolArg(std::string const& strArg) const;
» more...

Return boolean argument or default value

[[requires_capability(0x7f2e381adae8)]]
bool
GetBoolArg(
    std::string const& strArg,
    bool fDefault) const;
» more...

Return Value

  • The boolean value, or std::nullopt if unset.
  • command-line argument or default value

Parameters

NameDescription
strArgArgument to get (e.g. "-foo").
fDefault(true or false)