typeid operator
Da 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. |
Consultas de informações de um tipo.
Original:
Queries information of a 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.
Utilizado quando o tipo real de uma classe base virtual deve ser conhecido.
Original:
Used where the actual type of a virtual base class must be known.
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.
Índice |
[editar]Sintaxe
typeid( type) | (1) | ||||||||
typeid( expression) | (2) | ||||||||
<typeinfo>
cabeçalho deve ser incluído antes de usar operador typeid
. Original:
Header
<typeinfo>
must be included before using typeid
operator. 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.
Ambas as versões retornar um objeto do tipo conststd::type_info&.
Original:
Both versions return an object of type conststd::type_info&.
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.
[editar]Explicação
1)retorna o tipo de informação sobre o type. O tipo será definitivamente conhecido em tempo de compilação e nenhuma sobrecarga de tempo de execução é causado.
2) Original:
returns the type information about the type. The type will be definitely known compile time and no runtime overhead is caused.
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.
expressão é avaliada e informação de tipo correspondente ao valor resultante é devolvido. Se o expression está em uma classe base virtual, o tipo real da classe é consultado dinamicamente com alguma sobrecarga de tempo de execução. Caso contrário, o tipo real é tempo de compilação definitivamente conhecido e sem nenhuma sobrecarga de tempo de execução é causado.
Original:
expression is evaluated and type information corresponding to the resulting value is returned. If the expression is in a virtual base class, the actual type of the class is queried dynamically with some runtime overhead. Otherwise the actual type is definitely known compile time and no runtime overhead is caused.
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.
[editar]Palavras-chave
[editar]Exemplo
Esta seção está incompleta Motivo: sem exemplo |