[#BloombergLP-bslmf-ForwardingRefTypeUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmf.adoc[bslmf]::ForwardingRefTypeUtil
:relfileprefix: ../../
:mrdocs:

Provide a namespace for the `forwardToTarget` function&period;

== Synopsis

Declared in `&lt;bslmf&lowbar;forwardingreftype&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;TYPE&gt;
class ForwardingRefTypeUtil;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/ForwardingRefTypeUtil/TargetType.adoc[`TargetType`] 
| The closest type used to &quot;reconstitute&quot; `t&lowbar;TYPE` from `ForwardingRefType&lt;t&lowbar;TYPE&gt;&colon;&colon;Type`&period; This type may differ from `t&lowbar;TYPE` through the addition of a reference&period;
|===


== Using Declarations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/ForwardingRefTypeUtil/forwardToTarget.adoc[`forwardToTarget`] 
| Return (for the specified `v` parameter) `std&colon;&colon;forward&lt;t&lowbar;TYPE&gt;(v)`, where `v` is assumed to originally have been an argument of `t&lowbar;TYPE` after forwarding through an intermediate call chain&period; Specifically, if `t&lowbar;TYPE` is an rvalue type, return an rvalue reference to `v`, otherwise return `v` unchanged, thus converting an rvalue copy into an rvalue move when possible&period; For compilers that do not support rvalue references, return `v` unchanged&period; This function is intended to be called to forward an argument to the final target function of a forwarding call chain&period; Note that this function is not intended for use with `t&lowbar;TYPE` parameters of `volatile`&hyphen;qualified rvalue type, which are effectively unheard of in real code and have strange and hard&hyphen;to&hyphen;understand rules&period;
|===



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