std::add_lvalue_reference, std::add_rvalue_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. |
| Defined in header <type_traits>
|
||
| template< class T > struct add_lvalue_reference; |
(1) | (a partir do C++ 11) |
| template< class T > struct add_rvalue_reference; |
(2) | (a partir do C++ 11) |
Se
2) 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.
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.
Í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
|
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. |
[editar] 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&&
[editar] Exemplo
| This section is incomplete Reason: no example |
[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) |
remove referência do tipo de dado Original: removes reference from 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) |