[#BloombergLP-bdlf-MemFnInstance] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlf.adoc[bdlf]::MemFnInstance :relfileprefix: ../../ :mrdocs: This class encapsulates a member function pointer having the parameterized `PROTOTYPE` and a value of the parameterized `INSTANCE` type, which can be either be the type of object referred to by the `PROTOTYPE`, or a pointer to one, such that the member function pointer can be invoked on the wrapped instance in syntactically the same manner as a free function pointer. Zero to fourteen additional arguments may be specified depending on the `PROTOTYPE`. Note that whether `INSTANCE` is a pointer or an object is determined by whether it has pointer semantics or not (as determined by the `bslmf::HasPointerSemantics` type trait). Also note that if `INSTANCE` is an object that does not have pointer semantics, `PROTOTYPE` must be const‐qualified. == Synopsis Declared in `<bdlf_memfn.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class PROTOTYPE, class INSTANCE> class MemFnInstance; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlf/MemFnInstance/Args.adoc[`Args`] | `Args` is an alias for the list of arguments passed to an invocation of this member function wrapper, expressed as a `bslmf_Typelist`. | xref:BloombergLP/bdlf/MemFnInstance/Deref.adoc[`Deref`] | Dereference helper for the bound object type. | xref:BloombergLP/bdlf/MemFnInstance/ObjectType.adoc[`ObjectType`] | `ObjectType` is an alias for the class type to which the member function that is wrapped belongs. | xref:BloombergLP/bdlf/MemFnInstance/ProtoType-0e.adoc[`ProtoType`] | `ProtoType` is an alias for the parameterized `PROTOTYPE` passed as a template argument to this wrapper. | xref:BloombergLP/bdlf/MemFnInstance/Prototype-07.adoc[`Prototype`] | `ProtoType` is an alias for the parameterized `PROTOTYPE` passed as a template argument to this wrapper. | xref:BloombergLP/bdlf/MemFnInstance/ResultType.adoc[`ResultType`] | `ResultType` is an alias for the type of the object returned by an invocation of this member function wrapper. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlf/MemFnInstance/2constructor-02.adoc[`MemFnInstance`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlf/MemFnInstance/2destructor.adoc[`~MemFnInstance`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bdlf/MemFnInstance/operator_assign.adoc[`operator=`] | Assign to this member function pointer wrapper the same member function and instance pointed to by the specified `rhs` member function pointer wrapper, and return a reference to this modifiable member function pointer wrapper. | xref:BloombergLP/bdlf/MemFnInstance/operator_call-07.adoc[`operator()`] | Function call operators |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#