◐ Shell
clean mode source ↗

std::pointer_traits::pointer_to - cppreference.com

Da cppreference.com.

Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.

La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui.

Click here for the English version of this page

<metanoindex/>

<tbody> </tbody>

Elemento definito nell'header

<memory>

static pointer pointer_traits<Ptr>::pointer_to(element_type& r );

(dal C++11)

<tbody> </tbody>

static pointer pointer_traits<T*>::pointer_to(element_type& r);

(dal C++11)

Costruisce un puntatore dereferenceable la sua tesi.

Original:

Constructs a dereferenceable pointer to its argument.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

1)

La versione di questa funzione nel non specializzato modello std::pointer_traits chiama semplicemente Ptr::pointer_to(r), e se Ptr non fornisce una funzione di membro static pointer_to, istanze di questa funzione è un errore di compilazione.

Original:

The version of this function in the non-specialized std::pointer_traits template simply calls Ptr::pointer_to(r), and if Ptr does not provide a static member function pointer_to, instantiation of this function is a compile-time error.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

2)

La versione di questa funzione nella specializzazione di std::pointer_traits per i tipi di puntatore restituisce std::addressof(r)

Original:

The version of this function in the specialization of std::pointer_traits for pointer types returns std::addressof(r)

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parametri

r -

riferimento a un oggetto di element_type& tipo, a meno che ELEMENT_TYPE è void, nel qual caso il tipo di r non è specificato

Original:

reference to an object of type element_type&, except if element_type is void, in which case the type of r is unspecified

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Valore di ritorno

Un puntatore a dereferenceable r, del pointer_traits tipo <> :: puntatore.

Original:

A dereferenceable pointer to r, of the type pointer_traits<>::pointer.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Eccezioni

1)

Non specificato (in genere come Ptr::pointer_to)

Original:

Unspecified (typically same as Ptr::pointer_to)

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

2)

Note

Il boost library version di questa funzione restituisce pointer(std::addressof(r)) se Ptr :: pointer_to non esiste.

Original:

The boost library version of this function returns pointer(std::addressof(r)) if Ptr::pointer_to does not exist.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Vedi anche

ottiene l'indirizzo reale di un oggetto, anche se l'operatore &' è sovraccarico

Original:

obtains actual address of an object, even if the & operator is overloaded

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(funzione di modello) [modifica]

ottiene l'indirizzo di un oggetto, anche se operator& è sovraccarico

Original:

obtains the address of an object, even if operator& is overloaded

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(metodo pubblico) [modifica]