ParseFlag overloads

Synopses

Declared in <absl/flags/marshalling.h>

Deprecated. Use AbslParseFlag() instead.

[[deprecated("Use AbslParseFlag() instead.")]]
bool
ParseFlag(
    std::string const& text,
    Duration* dst,
    std::string* error);

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.

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

Return Value

  • true upon successful parsing.

  • true if input was successfully parsed into *dst.

Parameters

Name

Description

text

The flag string to parse.

dst

Output parameter receiving the parsed duration.

error

Output parameter receiving an error message on failure.

input

The string to parse.

Created with MrDocs