Parses a string value into a flag value of type T. Do not add overloads of this function for your type directly; instead, add an AbslParseFlag() free function as documented above.

Synopsis

Declared in <absl/flags/marshalling.h>

template<typename T>
bool
ParseFlag(
    std::string_view input,
    T* dst,
    std::string* error);

Return Value

true if input was successfully parsed into *dst.

Parameters

Name

Description

input

The string to parse.

dst

The destination to store the parsed value in.

error

Set to an error message when parsing fails.

Created with MrDocs