std::add_pointer
来自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 add_pointer; |
(C++11 起) | |
提供的的成员typedef
type这是类型T*。如果T是一个引用类型,然后type是一个指针引用的类型.Original:
Provides the member typedef
type which is the type T*. If T is a reference type, then type is a pointer to the referred type.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: pointer to T or to the type referenced by TThe 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 add_pointer { typedef typename std::remove_reference<T>::type* type; }; |
[编辑] 为例
| 本节是不完整的 原因: no example |
[编辑] 另请参阅
| (C++11) |
检查如果一个类型是一个指针类型 Original: checks if a type is a pointer type 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 pointer 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. (类模板) |