[#absl-StatusBuilder-AttachPayload-0a8]
= xref:absl.adoc[absl]::xref:absl/StatusBuilder.adoc[StatusBuilder]::AttachPayload
:relfileprefix: ../../
:mrdocs:

`AttachPayload` overloads

== Synopses

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

Attaches a `MessageSet` extension payload using the default extension ID&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename MessageSetExtension&gt;
xref:absl/StatusBuilder.adoc[StatusBuilder]&
xref:absl/StatusBuilder/AttachPayload-0a7.adoc[AttachPayload](MessageSetExtension const& obj) &amp;
requires std&colon;&colon;is&lowbar;void&lowbar;v&lt;decltype(AbslInternalAttachPayload(&ast;this, obj))&gt;;
----

[.small]#xref:absl/StatusBuilder/AttachPayload-0a7.adoc[_» more&period;&period;&period;_]#

Attaches a `MessageSet` extension payload using the default extension ID&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename MessageSetExtension&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
decltype(std&colon;&colon;move(AttachPayload(obj)))
xref:absl/StatusBuilder/AttachPayload-04.adoc[AttachPayload](MessageSetExtension const& obj) &amp;&amp;;
----

[.small]#xref:absl/StatusBuilder/AttachPayload-04.adoc[_» more&period;&period;&period;_]#

Attaches a `MessageSet` extension payload to the result status&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename MessageSetExtension,
    typename ExtensionIdentifier&gt;
xref:absl/StatusBuilder.adoc[StatusBuilder]&
xref:absl/StatusBuilder/AttachPayload-08.adoc[AttachPayload](
    MessageSetExtension const& obj,
    ExtensionIdentifier const& id) &amp;
requires std&colon;&colon;is&lowbar;void&lowbar;v&lt;decltype(AbslInternalAttachPayload(&ast;this, obj, id))&gt;;
----

[.small]#xref:absl/StatusBuilder/AttachPayload-08.adoc[_» more&period;&period;&period;_]#

Attaches a `MessageSet` extension payload to the result status&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename MessageSetExtension,
    typename ExtensionIdentifier&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
decltype(std&colon;&colon;move(AttachPayload(obj, id)))
xref:absl/StatusBuilder/AttachPayload-02.adoc[AttachPayload](
    MessageSetExtension const& obj,
    ExtensionIdentifier const& id) &amp;&amp;;
----

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

== Return Value

`&ast;this` to allow method chaining&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *obj*
| The extension message to attach&period;
| *id*
| The extension identifier for `obj`&period;
|===


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