[#bsl-function-0a-2conversion-03]
= xref:bsl.adoc[bsl]::xref:bsl/function-0a.adoc[function]::operator bool
:relfileprefix: ../../
:mrdocs:

Return whether this `function` currently holds a target&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;function&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
operator bool() const noexcept;
----

== Description

(C&plus;&plus;11 and later) Return false if this object is empty, otherwise return true&period; Note that this is an explicit conversion operator and is typically invoked implicitly in contexts such as in the condition of an `if` or `while` statement, though it can also be invoked via an explicit cast&period;

== Return Value

`true` if this object holds a target, and `false` otherwise


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