[#BloombergLP-bsltf-ArgumentTypeByValue] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::ArgumentTypeByValue :relfileprefix: ../../ :mrdocs: Pass‐by‐value wrapper that avoids a C++03 conversion ambiguity. == Synopsis Declared in `<bsltf_argumenttype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<int N> class ArgumentTypeByValue : public xref:BloombergLP/bsltf/ArgumentType.adoc[ArgumentType<N>] ---- == Description This class works around a limitation in C++03 whereby initializing a pass‐by‐value parameter of type `bslmf::ArgumentType<N>` from a `MovableRef<bslmf::ArgumentType<N> >` results in an ambiguous conversion sequence (i.e., `MovableRef::operator T&` vs. `ArgumentType(MovableRef)` are equally good conversions). Pass‐by‐value use cases (e.g., recording the value category of multiple function arguments) can use this class as a parameter type, instead, eliminating the ambiguity because `MovableRef<AT>` ‐> `AT&` ‐> `ArgumentTypeByValue` requires _two_ user‐defined conversions and is therefore eliminated during overload resolution. == Base Classes [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bsltf/ArgumentType.adoc[ArgumentType<N>]` | Non‐allocating integer wrapper that tracks copy and move operations. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/ArgumentTypeByValue/2constructor-07.adoc[`ArgumentTypeByValue`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsltf/ArgumentType/operator_assign-09.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bsltf/ArgumentType/copyMoveState.adoc[`copyMoveState`] | Return the copy/move state of this object. | xref:BloombergLP/bsltf/ArgumentType/movedFrom.adoc[`movedFrom`] | Return whether this object was the source of a move operation. | xref:BloombergLP/bsltf/ArgumentType/movedInto.adoc[`movedInto`] | Return whether this object was the target of a move operation. | xref:BloombergLP/bsltf/ArgumentType/reset.adoc[`reset`] | Set this object to the default‐constructed state. | xref:BloombergLP/bsltf/ArgumentType/set.adoc[`set`] | Set this object's value and copy/move state. | xref:BloombergLP/bsltf/ArgumentType/2conversion.adoc[`operator int`] | Return the value of this object. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/copyMoveState-05.adoc[`copyMoveState`] | Return the copy/move state of the specified `obj`. | xref:BloombergLP/bsltf/debugprint-01f.adoc[`debugprint`] | Print the specified `object` as a string. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#