absl::ParseFlag

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);
» more...

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);
» more...

Return Value

  • true upon successful parsing.
  • true if input was successfully parsed into *dst.

Parameters

NameDescription
textThe flag string to parse.
dstOutput parameter receiving the parsed duration.
errorOutput parameter receiving an error message on failure.
inputThe string to parse.