ArgsManager::GetIntArg

GetIntArg overloads

Synopses

Declared in <common/args.h>

Return a 64-bit integer argument, or std::nullopt if it was not set.

[[requires_capability(0x7f2e381ad9a8)]]
std::optional<int64_t>
GetIntArg(std::string const& strArg) const;
» more...

Return a 64-bit integer argument or default value.

[[requires_capability(0x7f2e381ad868)]]
int64_t
GetIntArg(
    std::string const& strArg,
    int64_t nDefault) const;
» more...

Return Value

  • The argument value, or std::nullopt if unset.
  • The argument value, or nDefault if unset.

Parameters

NameDescription
strArgArgument to get (e.g. "-foo").
nDefaultValue returned when the argument is unset.