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.
Synopsis
Declared in <bsltf_argumenttype.h>
template<int N>
class ArgumentTypeByValue
: public ArgumentType<N>
Base Classes
Name |
Description |
This class template wraps an integer value and provides implicit conversion to, and explicit conversion from, |
Member Functions
Name |
Description |
|
Constructors |
Assignment operators |
|
Return the copy/move state of this object. |
|
Return |
|
Return |
|
Set this object to the default‐constructed state. |
|
Set this object to the specified |
|
Return the value of this object. |
Non-Member Functions
Name |
Description |
Return the copy/move state of the specified |
|
Print the specified |
Created with MrDocs