◐ Shell
clean mode source ↗

std::remove_reference - cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

Definido no cabeçalho

<type_traits>

template< class T > struct remove_reference;

(desde C++11)

Se o T tipo é um tipo de referência, proporciona a type membro typedef que é o tipo referido por T. Caso contrário 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.

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

do tipo referido por T T ou se não é uma referência

Original:

the type referred by T or T if it is not a reference

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 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;};

Exemplo

Veja também

verifica se um tipo é lvalue referência ou referência 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.


(modelo de classe) [edit]

acrescenta lvalue ou' rvalue referência ao tipo de dado

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.


(modelo de classe) [edit]