[#absl-Condition-2constructor-00]
= xref:absl.adoc[absl]::xref:absl/Condition.adoc[Condition]::Condition
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;absl&sol;synchronization&sol;mutex&period;h&gt;`

Constructs a `Condition` that returns the value of `&ast;cond`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:absl/Condition/2constructor-0fb.adoc[Condition](bool const* cond);
----

[.small]#xref:absl/Condition/2constructor-0fb.adoc[_» more&period;&period;&period;_]#

Constructs a `Condition` from a functor exposing `bool operator() const`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
requires synchronization&lowbar;internal&colon;&colon;HasConstMemberCallOperator&lt;T&gt;&colon;&colon;value
explicit
xref:absl/Condition/2constructor-0b.adoc[Condition](T const* obj);
----

[.small]#xref:absl/Condition/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Constructs a `Condition` from a functor that does not match the `bool operator()() const` signature&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
requires !synchronization&lowbar;internal&colon;&colon;HasConstMemberCallOperator&lt;T&gt;&colon;&colon;value &amp;&amp;
          sizeof(static&lowbar;cast&lt;bool (&ast;)(const T&amp;)&gt;(&amp;T&colon;&colon;operator())) !&equals; 0
explicit
xref:absl/Condition/2constructor-04.adoc[Condition](T const* obj);
----

[.small]#xref:absl/Condition/2constructor-04.adoc[_» more&period;&period;&period;_]#

Constructs a `Condition` that returns the result of `(&ast;func)(arg)`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/Condition/2constructor-0f9.adoc[Condition](
    bool(* func)(void*),
    void* arg);
----

[.small]#xref:absl/Condition/2constructor-0f9.adoc[_» more&period;&period;&period;_]#

Constructs a `Condition` that evaluates `object&hyphen;&gt;method()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
xref:absl/Condition/2constructor-0ef.adoc[Condition](
    T* object,
    bool(T::* method)());
----

[.small]#xref:absl/Condition/2constructor-0ef.adoc[_» more&period;&period;&period;_]#

Constructs a `Condition` that evaluates a const member function&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
xref:absl/Condition/2constructor-0d.adoc[Condition](
    T const* object,
    bool const(T::* method)());
----

[.small]#xref:absl/Condition/2constructor-0d.adoc[_» more&period;&period;&period;_]#

Constructs a `Condition` from a typed function pointer and argument&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
xref:absl/Condition/2constructor-02.adoc[Condition](
    bool(* func)(T*),
    T* arg);
----

[.small]#xref:absl/Condition/2constructor-02.adoc[_» more&period;&period;&period;_]#

Constructs a `Condition` allowing `arg` to be implicitly convertible to the function parameter type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    typename = void&gt;
xref:absl/Condition/2constructor-0ec.adoc[Condition](
    bool(* func)(T*),
    T* arg);
----

[.small]#xref:absl/Condition/2constructor-0ec.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cond*
| Pointer to the boolean to read&period;
| *obj*
| The functor to evaluate&period;
| *func*
| The predicate function to evaluate&period;
| *arg*
| The argument passed to `func`&period;
| *object*
| The object on which to invoke the method&period;
| *method*
| The member function to evaluate&period;
|===


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