[#absl-CommandLineFlag-TryGet] = xref:absl.adoc[absl]::xref:absl/CommandLineFlag.adoc[CommandLineFlag]::TryGet :relfileprefix: ../../ :mrdocs: Attempts to retrieve the flag value. == Synopsis Declared in `<absl/flags/commandlineflag.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T> std::optional<T> TryGet() const; ---- == Return Value The flag value on success, `std::nullopt` otherwise. [.small]#Created with https://www.mrdocs.com[MrDocs]#