cv (<div class="t-tr-text">const volatilidade<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">const-volatility</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div>) specifiers
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. |
const
- define que o tipo é constante'.Original:const
- defines that the type is constant.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.volatile
- define que o tipo é volátil'.Original:volatile
- defines that the type is volatile.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.mutable
- define que um membro de uma classe não afeta o estado externamente visível da classe. Membrosmutable
pode ser modificado em' classes de constantes, que é constness' é essencialmente ignorados para o membro particular.Original:mutable
- defines that a member of a class does not affect the externally visible state of the class.mutable
members can be modified in constant classes, that is constness is essentially ignored for the particular member.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[editar] Explicação
- Nota: CV-eliminatórias </ b> e <b> cv-especificadores </ b> (lista acima) não são os mesmos thing.
O CV-eliminatórias são propriedades de um tipo enquanto cv-especificadores são recurso de linguagem para definir CV-eliminatórias</div>Original:Note: <b>cv-qualifiers</b> and <b>cv-specifiers</b> (list above) are not the same thing.
The cv-qualifiers are properties of a type whereas cv-specifiers are language feature to define cv-qualifiersThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cv-eliminatórias definir duas propriedades básicas de um tipo: constness''' e volatilidade. A cv-qualificador pode ser um dos seguintes:
'const volatile'
, 'const'
, 'volatile'
ou 'none'
. const
define que o tipo é constante, volatile
define que o tipo é' volátil. Tipo não-constante e não-volátil não tem restrições adicionais, enquanto constante e volátil implica o seguinte:Original:
Cv-qualifiers define two basic properties of a type: constness and volatility. A cv-qualifer can be one of the following:
'const volatile'
, 'const'
, 'volatile'
or 'none'
. const
defines that a type is constant, volatile
defines that the type is volatile. Non-constant and non-volatile type has no additional restrictions, whereas constant and volatile imply the following: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.
- ' 'Constante - o objeto não deve ser modificado. Tente fazer isso resulta em comportamento indefinido. Na maioria dos compiladores é tempo de compilação erro.Original:constant - the object shall not be modified. Attempt to do so results in undefined behavior. On most compilers it is compile-time error.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - ' 'Volátil - o objeto pode ser modificado por meio não detectáveis pelo compilador e, portanto, algumas otimizações do compilador deve ser desativado.Original:volatile - the object can be modified by means not detectable by the compiler and thus some compiler optimizations must be disabled.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Há ordenação parcial de CV-eliminatórias pela ordem de restrições crescentes. O tipo pode ser dito mais ou' cv menos qualificado, então:
Original:
There is partial ordering of cv-qualifiers by the order of increasing restrictions. The type can be said more or less cv-qualified then:
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.
- Incompetente <
const
Original:unqualified <const
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Incompetente <
volatile
Original:unqualified <volatile
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Incompetente <
const volatile
Original:unqualified <const volatile
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
const
<const volatile
-
volatile
<const volatile
-
Qualquer CV-eliminatórias são parte da definição do tipo, portanto, com diferentes tipos de CV-qualificações são sempre diferentes tipos. Portanto elenco é necessária para corresponder ao atribuir tipos de variáveis, funções de chamada, etc, só lançando a mais cv qualificado tipo é feito automaticamente como parte de <div class="t-tr-text"> conversões implícitas
. Em particular, as seguintes conversões são permitidos:Original:
implicit conversions
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Original:
Any cv-qualifiers are part of the type definition, hence types with different cv-qualifications are always different types. Therefore casting is needed to match types when assigning variables, calling functions, etc. Only casting to more cv-qualified type is done automatically as part of
conversões implícitas</div>. In particular, the following conversions are allowed:
Original:
implicit conversions
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
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.
- ' Tipo não qualificado pode ser convertido para
const
Original:unqualified type can be converted toconst
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - ' Tipo não qualificado pode ser convertido para
volatile
Original:unqualified type can be converted tovolatile
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - ' Tipo não qualificado pode ser convertido para
const volatile
Original:unqualified type can be converted toconst volatile
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
const
tipo pode ser convertida paraconst volatile
Original:const
type can be converted toconst volatile
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
volatile
tipo pode ser convertida paraconst volatile
Original:volatile
type can be converted toconst volatile
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
-
Para converter para um menos cv qualificado, tipo const_cast deve ser utilizado.
Original:
To convert to a less cv-qualified type, const_cast must be used.
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 |