std::add_lvalue_reference, std::add_rvalue_reference
Aus 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. |
definiert in Header <type_traits> | ||
template<class T > struct add_lvalue_reference; | (1) | (seit C++11) |
template<class T > struct add_rvalue_reference; | (2) | (seit C++11) |
Wenn
2) T
Aufgabe oder Funktion ist, liefert ein Element, das typedef type
T&
ist. Wenn T
ein rvalue Verweis auf irgendeine Art U
ist, dann type
ist U&
. Ansonsten ist 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.
Wenn
T
Aufgabe oder Funktion ist, liefert ein Element, das typedef type
T&&
ist, sonst ist 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.
Inhaltsverzeichnis |
[Bearbeiten]Mitglied Typen
Name 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 | Verweis auf T oder T wenn nicht erlaubtOriginal: 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. |
[Bearbeiten]Notes
Diese Art Transformationen Ehre Referenz Zusammenbruch Regeln:
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&&
[Bearbeiten]Beispiel
This section is incomplete Reason: no example |
[Bearbeiten]Siehe auch
(C++11) | prüft, ob ein Typ ist entweder lvalue Verweis oder rvalue Verweis 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. (Klassen-Template) |
(C++11) | Entfernt Verweis aus dem angegebenen Typ 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. (Klassen-Template) |