◐ Shell
clean mode source ↗

std::add_lvalue_reference, std::add_rvalue_reference – cppreference.com

Aus cppreference.com

<metanoindex/>

<tbody> </tbody>

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)

1)

Wenn 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.

2)

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.

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 erlaubt

Original:

reference to T, or T if not allowed

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

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.

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&&

Beispiel

Siehe auch

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) [edit]

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) [edit]