◐ Shell
clean mode source ↗

std::add_pointer - cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

Definido no cabeçalho

<type_traits>

template< class T > struct add_pointer;

(desde C++11)

Fornece o type membro typedef que é o T* tipo. Se T é um tipo de referência, então type é um ponteiro para o tipo referido.

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.

Tipos de membro

Nome

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

ponteiro para T ou para o tipo referenciado por T

Original:

pointer to T or to the type referenced by T

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

Possível implementação

template< class T >
struct add_pointer {
    typedef typename std::remove_reference<T>::type* type;
};

Exemplo

Veja também

verifica se um tipo é um tipo de ponteiro

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.


(modelo de classe) [edit]

remove ponteiro do tipo de dado

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.


(modelo de classe) [edit]