[#absl-CommandLineFlag-TryGet]
= xref:absl.adoc[absl]::xref:absl/CommandLineFlag.adoc[CommandLineFlag]::TryGet
:relfileprefix: ../../
:mrdocs:

Attempts to retrieve the flag value&period;

== Synopsis

Declared in `&lt;absl&sol;flags&sol;commandlineflag&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
std::optional&lt;T&gt;
TryGet() const;
----

== Return Value

The flag value on success, `std&colon;&colon;nullopt` otherwise&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
