Namespaces
Variants
Views
Actions

std::addressof

From cppreference.com
< cpp‎ | memory
Revision as of 10:03, 31 October 2011 by Cubbi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:cpp/memory/new/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <memory>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
template< class T >
T* addressof(T& arg);
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Obtains the actual address of the object or function arg, even in presence of overloaded operator&

Contents

Parameters

arg - lvalue object or function

Return value

Pointer to arg.

Exceptions

noexcept specification:  
noexcept
  

Equivalent function

Template:eq fun cpp

Example

Template:example cpp

See also

Template:cpp/memory/dcl list allocatorTemplate:cpp/memory/dcl list pointer traits