absl::CommandLineFlag::ParseFrom

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

NameDescription
valueThe new value to parse and assign to the flag.
errorSet to an error message when parsing fails.