std::remove_reference
Da cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Definido no cabeçalho <type_traits>
|
||
template< class T > struct remove_reference; |
(desde C++11) | |
Se o
T
tipo é um tipo de referência, proporciona a type
membro typedef que é o tipo referido por T
. Caso contrário 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.
You can help to correct and verify the translation. Click here for instructions.
Índice |
[editar] Tipos de membro
Nome
Original: Name The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
type
|
do tipo referido por
T T ou se não é uma referênciaOriginal: the type referred by T or T if it is not a referenceThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar] Possível implementação
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;}; |
[editar] Exemplo
Esta seção está incompleta Motivo: sem exemplo |
[editar] Veja também
(C++11) |
verifica se um tipo é lvalue referência ou referência rvalue Original: checks if a type is either lvalue reference or rvalue reference The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de classe) |
(C++11) (C++11) |
acrescenta lvalue ou' rvalue referência ao tipo de dado Original: adds lvalue or rvalue reference to the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de classe) |