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. |
| Defined in header <type_traits>
|
||
| template< class T > struct remove_reference; |
(C++11 起) | |
如果该类型
T是一个引用类型,成员typedeftype的类型,所提到的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;}; |
[编辑] 为例
| 本节是不完整的 原因: no example |
[编辑] 另请参阅
| (C++11) |
如果一个类型的检查是“左值引用”或“右值引用' 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) |
增加了“左值”或“右值”参考给定类型 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. (类模板) |