SettingToBool

SettingToBool overloads

Synopses

Declared in <common/args.h>

Convert a settings value to an optional boolean.

std::optional<bool>
SettingToBool(common::SettingsValue const& value);
» more...

Convert a settings value to a boolean, using a default when unset.

bool
SettingToBool(
    common::SettingsValue const& value,
    bool default_value);
» more...

Return Value

  • The boolean value, or std::nullopt when unset.
  • The boolean value, or the provided default when unset.

Parameters

NameDescription
valueThe settings value to convert.
default_valueValue returned when the setting is unset.