[#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&period; Zero to fourteen additional arguments may be specified depending on the `PROTOTYPE`&period; 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&colon;&colon;HasPointerSemantics` type trait)&period; Also note that if `INSTANCE` is an object that does not have pointer semantics, `PROTOTYPE` must be const&hyphen;qualified&period;

== Synopsis

Declared in `&lt;bdlf&lowbar;memfn&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class PROTOTYPE,
    class INSTANCE&gt;
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&lowbar;Typelist`&period;
| xref:BloombergLP/bdlf/MemFnInstance/Deref.adoc[`Deref`] 
| Dereference helper for the bound object type&period;
| xref:BloombergLP/bdlf/MemFnInstance/ObjectType.adoc[`ObjectType`] 
| `ObjectType` is an alias for the class type to which the member function that is wrapped belongs&period;
| xref:BloombergLP/bdlf/MemFnInstance/ProtoType-0e.adoc[`ProtoType`] 
| `ProtoType` is an alias for the parameterized `PROTOTYPE` passed as a template argument to this wrapper&period;
| xref:BloombergLP/bdlf/MemFnInstance/Prototype-07.adoc[`Prototype`] 
| `ProtoType` is an alias for the parameterized `PROTOTYPE` passed as a template argument to this wrapper&period;
| 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&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlf/MemFnInstance/2constructor-02.adoc[`MemFnInstance`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlf/MemFnInstance/2destructor.adoc[`&#126;MemFnInstance`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bdlf/MemFnInstance/operator_assign.adoc[`operator&equals;`] 
| 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&period;
| xref:BloombergLP/bdlf/MemFnInstance/operator_call-07.adoc[`operator()`] 
| Function call operators
|===



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