[#BloombergLP-bsls-Util-addressOf-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/Util.adoc[Util]::addressOf
:relfileprefix: ../../../
:mrdocs:

`addressOf` overloads

== Synopses

Declared in `&lt;bsls&lowbar;util&period;h&gt;`

Return the address of the specified `obj`, even if `operator&amp;` is overloaded for objects of type `BSLS&lowbar;TYPE`&period; Behavior is undefined unless `BSLS&lowbar;TYPE` is an object type&period; Note that this function conforms to the C&plus;&plus;11 definition for `addressof` as specified in the section 20.6.12.1[specialized&period;addressof] of the C&plus;&plus;11 standard, except that function types, which are not object types, are supported by `std&colon;&colon;addressof` in C&plus;&plus;11&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
static
TYPE*
xref:BloombergLP/bsls/Util/addressOf-08.adoc[addressOf](TYPE& obj);
----

[.small]#xref:BloombergLP/bsls/Util/addressOf-08.adoc[_» more&period;&period;&period;_]#

Return the address of the specified function `fn`&period; Note that this implementation supports functions of only a limited number of parameters, determined by the current needs of the BDE software&period; A more general form that will support an arbitrary number of function parameters will be available with C&plus;&plus;11&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RESULT&gt;
static
RESULT(*
xref:BloombergLP/bsls/Util/addressOf-0f.adoc[addressOf](RESULT(& fn)()))();
----

[.small]#xref:BloombergLP/bsls/Util/addressOf-0f.adoc[_» more&period;&period;&period;_]#

Return the address of the specified function `fn`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class RESULT,
    class ARG&gt;
static
RESULT(*
xref:BloombergLP/bsls/Util/addressOf-0c.adoc[addressOf](RESULT(& fn)(ARG)))(ARG);
----

[.small]#xref:BloombergLP/bsls/Util/addressOf-0c.adoc[_» more&period;&period;&period;_]#

Return the address of the specified function `fn`&period; Note that this implementation supports functions of only a limited number of parameters, determined by the current needs of the BDE software&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class RESULT,
    class ARG1,
    class ARG2&gt;
static
RESULT(*
xref:BloombergLP/bsls/Util/addressOf-0b.adoc[addressOf](RESULT(& fn)(ARG1, ARG2)))(ARG1, ARG2);
----

[.small]#xref:BloombergLP/bsls/Util/addressOf-0b.adoc[_» more&period;&period;&period;_]#


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