[#absl-Status-WithSourceLocation-0c]
= xref:absl.adoc[absl]::xref:absl/Status.adoc[Status]::WithSourceLocation
:relfileprefix: ../../
:mrdocs:

`WithSourceLocation` overloads

== Synopses

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

Returns a copy of the current status, with `loc` appended to its location chain iff the status is non&hyphen;ok and contains a non&hyphen;empty message&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/Status.adoc[Status]
xref:absl/Status/WithSourceLocation-06.adoc[WithSourceLocation](xref:absl/SourceLocation.adoc[absl::SourceLocation] loc = absl&colon;&colon;SourceLocation&colon;&colon;current()) const &amp;;
----

[.small]#xref:absl/Status/WithSourceLocation-06.adoc[_» more&period;&period;&period;_]#

Appends the `loc` to the current location chain inside the status iff the status is non&hyphen;ok and contains a non&hyphen;empty message, and returns an rvalue reference to `&ast;this`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
xref:absl/Status.adoc[Status]&&
xref:absl/Status/WithSourceLocation-0f.adoc[WithSourceLocation](xref:absl/SourceLocation.adoc[absl::SourceLocation] loc = absl&colon;&colon;SourceLocation&colon;&colon;current()) &amp;&amp;;
----

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

== Return Value

* A copy of this status with `loc` appended&period;
* An rvalue reference to `&ast;this`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *loc*
| The source location to append&period;
|===


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