std::remove_reference - 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. |
<metanoindex/>
<tbody> </tbody>
| Elemento definito nell'header <type_traits> |
||
|
|
(dal C++11) | |
Se il T tipo è un tipo di riferimento, fornisce la type membro typedef che è il tipo, cui si riferisce T. In caso contrario, è type T.
Original:
If the type T is a reference type, provides the member typedef type which is the type, referred to by T. Otherwise type is T.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Membri tipi
Nome Original: Name The text has been machine-translated via Google Translate. |
Definition |
type
|
il tipo da cui Original: the type referred by The text has been machine-translated via Google Translate. |
Possibile implementazione
template< class T > struct remove_reference {typedef T type;}; template< class T > struct remove_reference<T&> {typedef T type;}; template< class T > struct remove_reference<T&&> {typedef T type;};
Esempio
Vedi anche
Verifica se un tipo è o lvalue riferimento o di riferimento rvalue Original: checks if a type is either lvalue reference or rvalue reference The text has been machine-translated via Google Translate. (classe template) [modifica] | |
aggiunge lvalue' o' rvalue riferimento al tipo di dato Original: adds lvalue or rvalue reference to the given type The text has been machine-translated via Google Translate. (classe template) [modifica] | |