Sets the value of an absl::Flag to the value v. Do not construct an absl::Flag<T> directly and call absl::SetFlag(); instead, use the flag's variable name (e.g. FLAGS_name). This function is thread‐safe, but is potentially expensive. Avoid setting flags in general, but especially within performance‐critical code.

Synopsis

Declared in <absl/flags/flag.h>

template<typename T>
void
SetFlag(
    absl::Flag<T>* flag,
    T const& v);

Parameters

Name

Description

flag

The flag to update.

v

The new value to assign to flag.

Created with MrDocs