std::add_lvalue_reference, std::add_rvalue_reference
Материал из 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. |
| Заголовочный файл <type_traits>
|
||
| template< class T > struct add_lvalue_reference; |
(1) | (начиная с C++11) |
| template< class T > struct add_rvalue_reference; |
(2) | (начиная с C++11) |
Если
2) T это объект или функцию, обеспечивает членов ЬурейеЕ type который T&. Если T является RValue ссылкой на некоторый тип U, то type является U&. В противном случае, 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.
Если
T это объект или функцию, обеспечивает членов ЬурейеЕ type который T&&, в противном случае 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.
Содержание |
[править] Член типов
| Имя
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
|
Ссылка на
T, или T, если не допускаетсяOriginal: 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. |
[править] Notes
Такого рода преобразования честь ссылкой распада правил
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&&
[править] Пример
| Этот раздел не завершён Причина: нет примера |
[править] См. также
| (C++11) |
проверяет, является ли тип либо именующее ссылкой или' 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. (шаблон класса) |
| (C++11) |
удаляет ссылки из данного типа 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. (шаблон класса) |