[#absl-AnyInvocable-operator_assign-0b]
= xref:absl.adoc[absl]::xref:absl/AnyInvocable.adoc[AnyInvocable]::operator&equals;
:relfileprefix: ../../
:mrdocs:

Assignment operators

== Synopses

Declared in `&lt;absl&sol;functional&sol;any&lowbar;invocable&period;h&gt;`

Assigns an `AnyInvocable` through move&hyphen;assignment&period; Note that `f` is not guaranteed to be empty after move&hyphen;assignment although it may be&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/AnyInvocable.adoc[AnyInvocable]&
xref:absl/AnyInvocable/operator_assign-02.adoc[operator&equals;](xref:absl/AnyInvocable.adoc[AnyInvocable]&& f) noexcept = default;
----

[.small]#xref:absl/AnyInvocable/operator_assign-02.adoc[_» more&period;&period;&period;_]#

Assigns an `AnyInvocable` from a nullptr, clearing the `AnyInvocable`&period; If not empty, destroys the target, putting `&ast;this` into an empty state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/AnyInvocable.adoc[AnyInvocable]&
xref:absl/AnyInvocable/operator_assign-0a.adoc[operator&equals;](std::nullptr&lowbar;t unused) noexcept;
----

[.small]#xref:absl/AnyInvocable/operator_assign-0a.adoc[_» more&period;&period;&period;_]#

Assigns an `AnyInvocable` from a reference to an invocable object&period; Upon assignment, stores a reference to the invocable object in the `AnyInvocable` instance&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class F&gt;
requires internal&lowbar;any&lowbar;invocable&colon;&colon;CanAssignReferenceWrapper&lt;Sig, F&gt;&colon;&colon;value
xref:absl/AnyInvocable.adoc[AnyInvocable]&
xref:absl/AnyInvocable/operator_assign-0f.adoc[operator&equals;](std::reference&lowbar;wrapper&lt;F&gt; f) noexcept;
----

[.small]#xref:absl/AnyInvocable/operator_assign-0f.adoc[_» more&period;&period;&period;_]#

Assigns an `AnyInvocable` from an existing `AnyInvocable` instance&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class F&gt;
requires internal&lowbar;any&lowbar;invocable&colon;&colon;CanAssign&lt;Sig, F&gt;&colon;&colon;value
xref:absl/AnyInvocable.adoc[AnyInvocable]&
xref:absl/AnyInvocable/operator_assign-0d.adoc[operator&equals;](F&& f);
----

[.small]#xref:absl/AnyInvocable/operator_assign-0d.adoc[_» more&period;&period;&period;_]#

== Return Value

A reference to `&ast;this`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *f*
| The `AnyInvocable` to move from&period;
| *unused*
| Unused parameter&period;
|===


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