cv (<div class="t-tr-text">const-volatilità<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.
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
const
- definisce che il tipo è costante.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
- definisce che il tipo è volatili.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
- definisce che un membro di una classe non influisce sullo stato visibile all'esterno della classe.mutable
membri possono essere modificati in classi' costante, che è constness' è essenzialmente ignorato per il membro particolare.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.
[modifica]Spiegazione
- Nota: cv-qualificazioni </ b> e <b> cv-specificatori di </ b> (elenco) non sono la stessa cosa thing.
il CV-qualificazioni sono proprietà di un tipo, mentre cv-specificatori sono funzionalità del linguaggio per definire cv-qualificazione</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-qualificazioni definire due proprietà di base di un tipo: constness''' e la volatilità. Un cv-qualifer può essere uno dei seguenti:'const volatile'
,'const'
,'volatile'
o'none'
.const
definisce che un tipo è costante,volatile
definisce che il tipo è' volatile. Tipo non costante e non volatile non ha limitazioni aggiuntive, mentre costante e volatile implica quanto segue: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.- ' 'Costante - l'oggetto non deve essere modificata. Tentativo di farlo si traduce in un comportamento indefinito. Sulla maggior parte dei compilatori è errore di compilazione.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. - ' 'Volatili - l'oggetto può essere modificato con mezzi non rilevabili dal compilatore, e quindi alcune ottimizzazioni del compilatore deve essere disabilitato.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.
C'è ordinamento parziale di cv-qualificazione per ordine di crescenti restrizioni. Il tipo può essere detto più o meno cv-qualificato allora: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.- Qualificato <
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. - Qualificato <
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. - Qualificato <
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
Qualsiasi cv-qualificazione fanno parte della definizione del tipo, quindi con diversi tipi di cv-qualifiche sono sempre diversi tipi. Pertanto fusione è necessaria per abbinare i tipi quando si assegnano le variabili, le funzioni di chiamata, ecc Solo casting per più cv qualificati tipo viene eseguita automaticamente come parte del <div class="t-tr-text"> conversioni implicite. In particolare, le conversioni sono consentiti i seguenti:Original:implicit conversionsThe 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.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 ofconversioni implicite</div>. In particular, the following conversions are allowed:Original:implicit conversionsThe 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.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.- Tipo qualificato può essere convertito
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 qualificato può essere convertito
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 qualificato può essere convertito
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 può essere convertitoconst 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 può essere convertitoconst 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.
Per convertire in un meno cv qualificati tipo, const_cast deve essere utilizzato.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.[modifica]Parole chiave
[modifica]Esempio
This section is incomplete