Sets the value of the flag based on specified string value. If the flag was successfully set to new value, it returns true. Otherwise, sets error to indicate the error, leaves the flag unchanged, and returns false.

Synopsis

Declared in <absl/flags/commandlineflag.h>

bool
ParseFrom(
    std::string_view value,
    std::string* error);

Return Value

true if the flag was successfully set to the new value.

Parameters

Name

Description

value

The new value to parse and assign to the flag.

error

Set to an error message when parsing fails.

Created with MrDocs