std::remove_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 remove_reference; |
(начиная с C++11) | |
Если тип
T является ссылочным типом, обеспечивает членов ЬурейеЕ type, который является типом, на которые ссылается T. В противном случае type является T.Original:
If the type
T is a reference type, provides the member typedef type which is the type, referred to by 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: the type referred by T or T if it is not a referenceThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[править] Возможная реализация
template< class T > struct remove_reference {typedef T type;}; template< class T > struct remove_reference<T&> {typedef T type;}; template< class T > struct remove_reference<T&&> {typedef T type;}; |
[править] Пример
| Этот раздел не завершён Причина: нет примера |
[править] См. также
| (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) (C++11) |
именующее добавляет' или' RValue ссылка на данный тип Original: adds lvalue or rvalue reference to 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. (шаблон класса) |