[#absl-Status-ok]
= xref:absl.adoc[absl]::xref:absl/Status.adoc[Status]::ok
:relfileprefix: ../../
:mrdocs:

Returns `true` if `this&hyphen;&gt;code()` &equals;&equals; `absl&colon;&colon;StatusCode&colon;&colon;kOk`, indicating the absence of an error&period;

== Synopsis

Declared in `&lt;absl&sol;status&sol;status&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
bool
ok() const;
----

== Description

Prefer checking for an OK status using this member function&period;

== Return Value

`true` if the status is OK&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====

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