Namensräume
Varianten
Aktionen

cpp/language/cv: Unterschied zwischen den Versionen

Aus cppreference.com
< cpp‎ | language
K (r2.7.3) (Bot: Ergänze: en, es, fr, it, ja, pt, ru, zh)
 
Zeile 3: Zeile 3:
 
{{cpp/language/navbar}}
 
{{cpp/language/navbar}}
  
:*{{tr|{{ttb|const}} - legt fest, dass die Art'' Konstante'' .|{{ttb|const}} - defines that the type is ''constant''.}}
+
:*{{tr|{{ttb|const}} - legt fest, dass '''' .|{{ttb|const}} - defines that the type is ''constant''.}}
:*{{tr|{{ttb|volatile}} - legt fest, dass die Art'' flüchtig ist'' .|{{ttb|volatile}} - defines that the type is ''volatile''.}}
+
:*{{tr|{{ttb|volatile}} - legt fest, dass ''flüchtig'' .|{{ttb|volatile}} - defines that the type is ''volatile''.}}
:*{{tr|{{ttb|mutable}} - legt fest, dass ein Mitglied einer Klasse keinen Einfluss auf die äußerlich sichtbare Zustand der Klasse. {{tt|mutable}} Mitglieder können in'' Konstante'' Klassen, die'' Konstantheit'' ist im Wesentlichen für die jeweilige Mitglied ignoriert geändert werden .|{{ttb|mutable}} - defines that a member of a class does not affect the externally visible state of the class. {{tt|mutable}} members can be modified in ''constant'' classes, that is ''constness'' is essentially ignored for the particular member.}}
+
:*{{tr|{{ttb|mutable}} - legt fest, dass ein Mitglied einer Klasse keinen Einfluss auf äußerlich Zustand der Klasse . {{tt|mutable}} Mitglieder können in '''' Klassen , die ''Konstantheit'' im Wesentlichen für jeweilige Mitglied ignoriert .|{{ttb|mutable}} - defines that a member of a class does not affect the externally visible state of the class. {{tt|mutable}} members can be modified in ''constant'' classes, that ''constness'' is essentially ignored for the particular member.}}
  
 
===Erklärung===
 
===Erklärung===
:{{tr|Hinweis: <b> cv-Qualifikation </ b> und <b> cv-Planer </ b> (siehe Liste oben) sind nicht das Gleiche thing.<br> Die cv-Qualifikationsturniere sind Eigenschaften eines Typs während cv-Planer Sprache-Funktion sind um cv-Qualifikation zu definieren|Note: <b>cv-qualifiers</b> and <b>cv-specifiers</b> (list above) are not the same thing.<br> The cv-qualifiers are properties of a type whereas cv-specifiers are language feature to define cv-qualifiers}}
+
:{{tr|Hinweis: <b> cv-</b> und <b> cv-</b> (siehe Liste oben) sind nicht das Gleiche.<br> Die cv-sind Eigenschaften eines Typs während cv--sind um cv-zu definieren|Note: <b>cv-qualifiers</b> and <b>cv-specifiers</b> (list above) are not the same thing.<br> The cv-qualifiers are properties of a type whereas cv-specifiers are language feature to define cv-qualifiers}}
  
{{tr|Cv-Qualifikanten definieren zwei grundlegende Eigenschaften eines Typs:'' Konstantheit'' und'' Volatilität''. A cv-qualifer kann eine der folgenden sein: {{tt|'const volatile'}}, {{tt|'const'}}, {{tt|'volatile'}} oder {{tt|'none'}}. {{tt|const}} legt fest, dass eine Art'' Konstante'', {{tt|volatile}} legt fest, dass die Art'' flüchtigen'' ist. Nichtkonstante und nichtflüchtigen Typ hat keine zusätzlichen Beschränkungen, während konstanten und flüchtigen bedeuten folgendes:|Cv-qualifiers define two basic properties of a type: ''constness'' and ''volatility''. A cv-qualifer can be one of the following: {{tt|'const volatile'}}, {{tt|'const'}}, {{tt|'volatile'}} or {{tt|'none'}}. {{tt|const}} defines that a type is ''constant'', {{tt|volatile}} defines that the type is ''volatile''. Non-constant and non-volatile type has no additional restrictions, whereas constant and volatile imply the following:}}
+
{{tr|Cv-definieren zwei grundlegende Eigenschaften eines Typs:'' Konstantheit'' und'' ''. cv-kann eine der folgenden sein: {{tt|'const volatile'}}, {{tt|'const'}}, {{tt|'volatile'}} oder {{tt|'none'}}. {{tt|const}} legt fest, dass '''' , {{tt|volatile}} legt fest, dass '''' ist. und Typ hat keine Beschränkungen, während und folgendes :|Cv-qualifiers define two basic properties of a type: ''constness'' and ''volatility''. A cv-qualifer can be one of the following: {{tt|'const volatile'}}, {{tt|'const'}}, {{tt|'volatile'}} or {{tt|'none'}}. {{tt|const}} defines that a type is ''constant'', {{tt|volatile}} defines that the type is ''volatile''. Non-constant and non-volatile type has no additional restrictions, whereas constant and volatile imply the following:}}
  
:*{{tr|'''' 'Konstante''''' - das Objekt darf nicht verändert werden. Versuchen Sie, so dass die Ergebnisse nicht definiertes Verhalten zu tun. Bei den meisten Compilern ist es Kompilierungsfehler .|'''''constant''''' - the object shall not be modified. Attempt to do so results in undefined behavior. On most compilers it is compile-time error.}}
+
:*{{tr|'''''''''' - das Objekt darf nicht verändert werden. Verhalten. Bei den meisten Compilern ist Kompilierungsfehler.|'''''constant''''' - the object shall not be modified. Attempt to do so results in undefined behavior. On most compilers it is compile-time error.}}
:*{{tr|'''' 'Volatile''''' - das Objekt kann durch nicht nachweisbar durch den Compiler geändert werden und somit einige Compiler-Optimierungen deaktiviert werden .|'''''volatile''''' - the object can be modified by means not detectable by the compiler and thus some compiler optimizations must be disabled.}}
+
:*{{tr|'''''''''' - das Objekt kann durch nicht nachweisbar durch den Compiler geändert werden und somit einige Compiler-Optimierungen deaktiviert werden .|'''''volatile''''' - the object can be modified by means not detectable by the compiler and thus some compiler optimizations must be disabled.}}
  
{{tr|Es gibt partielle Ordnung der cv-Qualifikation durch die Reihenfolge der zunehmenden Einschränkungen. Der Typ kann gesagt werden'' mehr'' oder'' weniger'' cv qualifizierten dann:|There is partial ordering of cv-qualifiers by the order of increasing restrictions. The type can be said ''more'' or ''less'' cv-qualified then:}}
+
{{tr|Es gibt partielle Ordnung der cv-durch die Reihenfolge der zunehmenden Einschränkungen. Der Typ kann ''mehr'' oder ''weniger'' cv:|There is partial ordering of cv-qualifiers by the order of increasing restrictions. The type can be said ''more'' or ''less'' cv-qualified then:}}
  
:* {{tr|'' Uneingeschränkten'' <{{tt|const}}|''unqualified'' < {{tt|const}}}}
+
:* {{tr|'' '' < {{tt|const}}|''unqualified'' < {{tt|const}}}}
:* {{tr|'' Uneingeschränkten'' <{{tt|volatile}}|''unqualified'' < {{tt|volatile}}}}
+
:* {{tr|'' '' < {{tt|volatile}}|''unqualified'' < {{tt|volatile}}}}
:* {{tr|'' Uneingeschränkten'' <{{tt|const volatile}}|''unqualified'' < {{tt|const volatile}}}}
+
:* {{tr|'' '' < {{tt|const volatile}}|''unqualified'' < {{tt|const volatile}}}}
 
:* {{tt|const}} < {{tt|const volatile}}
 
:* {{tt|const}} < {{tt|const volatile}}
 
:* {{tt|volatile}} < {{tt|const volatile}}
 
:* {{tt|volatile}} < {{tt|const volatile}}
  
{{tr|Alle cv-Qualifikanten sind Teil der Typ-Definition, also mit unterschiedlichen cv-Qualifikationen sind immer verschiedene Typen. Deshalb Casting erforderlich ist, um Typen übereinstimmen, wenn die Zuordnung Variablen, Aufruf von Funktionen, etc. Nur Gießen, um'' mehr cv qualifizierten'' wird automatisch als Teil des {{rlp|implicit_cast |{{tr| impliziten Konvertierungen| implicit conversions}}}} getan. Insbesondere werden die folgenden Konvertierungen erlaubt:|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 {{rlp|implicit_cast |{{tr| impliziten Konvertierungen| implicit conversions}}}}. In particular, the following conversions are allowed:}}
+
{{tr|Alle cv-sind Teil der Typ-Definition, mit unterschiedlichen cv-Qualifikationen immer verschiedene Typen. Deshalb Casting erforderlich, um Typen , . Nur ''mehr cv qualifizierten'' wird automatisch als Teil {{rlp|implicit_cast |{{tr| impliziten Konvertierungen| implicit conversions}}}} getan. Insbesondere werden die folgenden Konvertierungen erlaubt:|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 {{rlp|implicit_cast |{{tr| impliziten Konvertierungen| implicit conversions}}}}. In particular, the following conversions are allowed:}}
  
:* {{tr|'' Uneingeschränkten'' Typ kann {{tt|const}} umgewandelt werden|''unqualified'' type can be converted to {{tt|const}}}}
+
:* {{tr|'' '' Typ kann {{tt|const}} umgewandelt werden|''unqualified'' type can be converted to {{tt|const}}}}
:* {{tr|'' Uneingeschränkten'' Typ kann {{tt|volatile}} umgewandelt werden|''unqualified'' type can be converted to {{tt|volatile}}}}
+
:* {{tr|'' '' Typ kann {{tt|volatile}} umgewandelt werden|''unqualified'' type can be converted to {{tt|volatile}}}}
:* {{tr|'' Uneingeschränkten'' Typ kann {{tt|const volatile}} umgewandelt werden|''unqualified'' type can be converted to {{tt|const volatile}}}}
+
:* {{tr|'' '' Typ kann {{tt|const volatile}} umgewandelt werden|''unqualified'' type can be converted to {{tt|const volatile}}}}
 
:* {{tr|{{tt|const}} Typ kann in {{tt|const volatile}} umgewandelt werden|{{tt|const}} type can be converted to {{tt|const volatile}}}}
 
:* {{tr|{{tt|const}} Typ kann in {{tt|const volatile}} umgewandelt werden|{{tt|const}} type can be converted to {{tt|const volatile}}}}
 
:* {{tr|{{tt|volatile}} Typ kann in {{tt|const volatile}} umgewandelt werden|{{tt|volatile}} type can be converted to {{tt|const volatile}}}}
 
:* {{tr|{{tt|volatile}} Typ kann in {{tt|const volatile}} umgewandelt werden|{{tt|volatile}} type can be converted to {{tt|const volatile}}}}
 
    
 
    
{{tr|Um zu einer'' weniger cv qualifizierten'' Typ zu konvertieren, müssen {{ltt|cpp/language/const_cast}} verwendet werden .|To convert to a ''less cv-qualified'' type, {{ltt|cpp/language/const_cast}} must be used.}}
+
{{tr|Um ''weniger cv qualifizierten'' Typ zu konvertieren, {{ltt|cpp/language/const_cast}} verwendet werden .|To convert to a ''less cv-qualified'' type, {{ltt|cpp/language/const_cast}} must be used.}}
  
 
===Keywords===
 
===Keywords===

Aktuelle Version vom 26. November 2013, 04:51 Uhr

 
 
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