Provide a namespace for the forwardToTarget function.
Declared in <bslmf_forwardingreftype.h>
template<class t_TYPE>
class ForwardingRefTypeUtil;
| Name | Description |
|---|---|
TargetType | The closest type used to "reconstitute" t_TYPE from ForwardingRefType<t_TYPE>::Type. This type may differ from t_TYPE through the addition of a reference. |
| Name | Description |
|---|---|
forwardToTarget | Return (for the specified v parameter) std::forward<t_TYPE>(v), where v is assumed to originally have been an argument of t_TYPE after forwarding through an intermediate call chain. Specifically, if t_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. For compilers that do not support rvalue references, return v unchanged. This function is intended to be called to forward an argument to the final target function of a forwarding call chain. Note that this function is not intended for use with t_TYPE parameters of volatile-qualified rvalue type, which are effectively unheard of in real code and have strange and hard-to-understand rules. |