std::add_lvalue_reference, std::add_rvalue_reference
De 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. |
Déclaré dans l'en-tête <type_traits> | ||
template<class T > struct add_lvalue_reference; | (1) | (depuis C++11) |
template<class T > struct add_rvalue_reference; | (2) | (depuis C++11) |
Si
2) T
est un objet ou une fonction, fournit une type
membre typedef qui est T&
. Si T
est une référence rvalue dans une certaine U
type, puis type
est U&
. Sinon, type
est 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.
Si
T
est un objet ou une fonction, fournit une type
membre typedef qui est T&&
, sinon type
est 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.
Sommaire |
[modifier]Types de membres
Nom 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 | référence à T ou T si elle n'est pas autoriséeOriginal: 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. |
[modifier]Notes
Ces transformations de type honneur règles effondrement de référence:
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&&
[modifier]Exemple
This section is incomplete Reason: no example |
[modifier]Voir aussi
(C++11) | vérifie si un type est soit lvalue de référence ou' rvalue de référence 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. (classe générique) |
(C++11) | supprime référence du type donné 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. (classe générique) |