std::add_lvalue_reference, std::add_rvalue_reference
De cppreference.com
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <type_traits>
|
||
template< class T > struct add_lvalue_reference; |
(1) | (desde C++11) |
template< class T > struct add_rvalue_reference; |
(2) | (desde C++11) |
1)
Se
T é um objeto ou função, fornece um membro type typedef que é T&. Se T é uma referência a alguns rvalue U tipo, então é type U&. Caso contrário, é type T.Original:
If
T is an object or function, provides a member typedef type which is T&. If T is an rvalue reference to some type U, then type is U&. 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.
2)
Se
T é um objecto ou função, proporciona um membro type typedef que é T&&, caso contrário, é type T.Original:
If
T is an object or function, provides a member typedef type which is 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.
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
|
referência à
T ou T não se permitidoOriginal: reference to T, or T if not allowedThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Notas
Essas transformações tipo de honra de referência colapso regras:
Original:
These type transformations honor reference collapse rules:
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.
std::add_lvalue_reference<T&>::type is T& std::add_lvalue_reference<T&&>::type is T& std::add_rvalue_reference<T&>::type is T& std::add_rvalue_reference<T&&>::type is T&&
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |
