Namensräume
Varianten
Aktionen

cv (<div class="t-tr-text">const-Volatilität<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

Aus cppreference.com
< cpp‎ | language

 
 
Sprache C + +
Allgemeine Themen
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Flusskontrolle
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Bedingte Ausführung Aussagen
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterationsanweisungen
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Gehe Aussagen
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funktion Erklärung
Lambda-Funktion Erklärung
Funktions-Template
inline-Spezifizierer
Exception-Spezifikationen (veraltet)
noexcept Spezifizierer (C++11)
Ausnahmen
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Namespaces
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
Specifiers
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv Planer
Lagerdauer Planer
constexpr Spezifizierer (C++11)
auto Spezifizierer (C++11)
alignas Spezifizierer (C++11)
Initialisierung
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Literale
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressions
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alternative Darstellungen
Utilities
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
Typ Aliasdeklaration (C++11)
Attribute (C++11)
Wirft
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
impliziten Konvertierungen
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
C-Stil und funktionale Besetzung
Speicherzuweisung
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Class-spezifische Funktion Eigenschaften
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
explizit (C++11)
statisch
Besondere Member-Funktionen
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Templates
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Klassen-Template
Funktions-Template
Template-Spezialisierung
Parameter Packs (C++11)
Verschiedenes
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Inline Montage
 
  • const - legt fest, dass der Typ konstant ist.
    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 - legt fest, dass der Typ flüchtig ist.
    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 - legt fest, dass ein Mitglied einer Klasse keinen Einfluss auf den äußerlich sichtbaren Zustand der Klasse hat. mutable Mitglieder können in konstanten Klassen modifiziert werden, sodass die Konstantheit im Wesentlichen für das jeweilige Mitglied ignoriert wird.
    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 its 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.

[Bearbeiten] Erklärung

Hinweis: cv-qualifier und cv-specifier (siehe Liste oben) sind nicht das Gleiche.
Die cv-qualifier sind Eigenschaften eines Typs während cv-specifier Sprach-Funktionen sind um cv-qualifier zu definieren
Original:
Note: cv-qualifiers and cv-specifiers (list above) are not the same thing.
The cv-qualifiers are properties of a type whereas cv-specifiers are language feature to define cv-qualifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cv-qualifier definieren zwei grundlegende Eigenschaften eines Typs: Konstantheit und Flüchtigkeit. Ein cv-qualifier kann eine der folgenden sein: 'const volatile', 'const', 'volatile' oder 'none'. const legt fest, dass der Typ konstant ist, volatile legt fest, dass der Typ flüchtig ist. Der nichtkonstante und nichtflüchtige Typ hat keine weiteren Beschränkungen, während konstant und flüchtig folgendes bedeuten :
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.
  • konstant - das Objekt darf nicht verändert werden. Falls dies versucht wird folgt ein unbestimmtes Verhalten. Bei den meisten Compilern ist dies ein Kompilierungsfehler.
    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.
  • flüchtig - das Objekt kann durch nicht nachweisbar durch den Compiler geändert werden und somit einige Compiler-Optimierungen deaktiviert werden .
    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.
Es gibt eine partielle Ordnung der cv-qualifer durch die Reihenfolge der zunehmenden Einschränkungen. Der Typ kann so als mehr oder weniger cv-qualifiziert beschrieben werden:
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.
  • uneingeschränkt < 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.
  • uneingeschränkt < 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.
  • uneingeschränkt < 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
Alle cv-qualifier sind Teil der Typ-Definition, daher sind Typen mit unterschiedlichen cv-Qualifikationen auch immer verschiedene Typen. Deshalb ist Casting erforderlich, um Typen bei Variablenzuweisung, Funktionenaufruf usw. anzupassen. Nur Casting nach mehr cv qualifizierten wird automatisch als Teil der <div class="t-tr-text"> impliziten Konvertierungen
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.
getan. Insbesondere werden die folgenden Konvertierungen erlaubt:
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
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • uneingeschränkter Typ kann const umgewandelt werden
    Original:
    unqualified type can be converted to const
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • uneingeschränkter Typ kann volatile umgewandelt werden
    Original:
    unqualified type can be converted to volatile
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • uneingeschränkter Typ kann const volatile umgewandelt werden
    Original:
    unqualified type can be converted to 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 Typ kann in const volatile umgewandelt werden
    Original:
    const type can be converted to const volatile
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • volatile Typ kann in const volatile umgewandelt werden
    Original:
    volatile type can be converted to const volatile
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Um in einen weniger cv qualifizierten Typ zu konvertieren, muss const_cast verwendet werden .
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.

[Bearbeiten] Keywords

const, volatile, mutable

[Bearbeiten] Beispiel