Namensräume
Varianten
Aktionen

Value categories

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
 
Wenn ein C + +-Ausdruck (ein Operator mit seinen Argumenten) ausgewertet wird, führt dies zu einem Wert von einigen Nicht-Referenz-Typ. Jeder Ausdruck gehört zu genau einer der primären Wertekategorien .
Original:
When a C++ expression (an operator with its arguments) is evaluated, it results in a value of some non-reference type. Each expression belongs to exactly one of the primary value categories.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Hauptkategorien

[Bearbeiten] lvalue

Ein lvalue ist ein Ausdruck, der einen nicht-temporären Objekt oder ein Nicht-Mitglied Funktion identifiziert .
Original:
An lvalue is an expression that identifies a non-temporary object or a non-member function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Die folgenden Ausdrücke sind lvalues:
Original:
The following expressions are lvalues:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Der Name eines Objekts oder einer Funktion im Umfang, unabhängig von der Art, wie std::cin oder std::endl. Selbst wenn das Objekt-Typ ist rvalue Referenz, ist der Ausdruck, bestehend aus seinem Namen ein L-Wert Ausdruck .
    Original:
    The name of an object or function in scope, regardless of type, such as std::cin or std::endl. Even if the object's type is rvalue reference, the expression consisting of its name is an lvalue expression.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Funktionsaufruf oder Operator Ausdruck, wenn die Funktion oder Betreiber Rückgabetyp ein L-Wert-Referenz ist, wie std::getline(cin, str) oder cout << 1 oder oder ++n oder *p
    Original:
    Function call or operator expression if the function's or operator's return type is an lvalue reference, such as std::getline(cin, str) or cout << 1 or or ++n or *p
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Cast Ausdruck lvalue Referenztyp .
    Original:
    Cast expression to lvalue reference type.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Aufruf der Funktion Ausdruck, wenn die Funktion den Rückgabetyp rvalue Verweis auf Funktionstyp (selten) ist
    Original:
    Function call expression if the function's return type is rvalue reference to function type (rare)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Cast Ausdruck Bezug auf Funktion rvalue .
    Original:
    Cast expression to rvalue reference to function.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Eigenschaften:
Original:
Properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Gleiche wie glvalue (unten)
    Original:
    Same as glvalue (below)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Adresse eines lvalue ergriffen werden: &++i und &std::endl gelten Ausdrücke .
    Original:
    Address of an lvalue may be taken: &++i and &std::endl are valid expressions.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Ein änderbarer lvalue kann als die erste (linke) Argument der eingebauten Zuweisungsoperator verwendet werden .
    Original:
    A modifiable lvalue may be used as the first (left) argument of the built-in assignment operator.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Ein L-Wert kann initialisiert eine lvalue Referenz verwendet werden, dies ordnet einen neuen Namen mit dem Objekt durch den Ausdruck identifiziert .
    Original:
    An lvalue may be used to initialisiert eine lvalue Referenz; this associates a new name with the object identified by the expression.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] rvalue NJ / prvalue NJ

A prvalue ist ein Ausdruck, der ein temporäres Objekt (oder ein Unterobjekt davon) identifiziert oder ist ein Wert, mit keinem Objekt zugeordnet .
Original:
A prvalue is an expression that identifies a temporary object (or a subobject thereof) or is a value not associated with any object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Die folgenden Ausdrücke sind prvalues:
Original:
The following expressions are prvalues:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Literal, wie 42 oder true oder nullptr .
    Original:
    Literal, such as 42 or true or nullptr.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Aufruf der Funktion / Operator Ausdruck, wenn die Funktion oder des Betreibers Rückgabetyp ist keine Referenz, wie str.substr(1, 2) oder 2+2
    Original:
    Function call/operator expression if the function's or the operator's return type is not a reference, such as str.substr(1, 2) or 2+2
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Cast Ausdruck zu keinem anderen Typ als Referenz-Typ .
    Original:
    Cast expression to any type other than reference type.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Lambda-Ausdrücke, wie  [](int x){return x*x;}
    Original:
    Lambda expressions, such as  [](int x){return x*x;}
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Eigenschaften:
Original:
Properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Gleich wie rvalue (unten)
    Original:
    Same as rvalue (below)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ein prvalue kann nicht polymorphe: die dynamischen Typ des Objekts identifiziert, es ist stets die Art der Expression .
    Original:
    a prvalue cannot be polymorphic: the dynamic type of the object it identifies is always the type of the expression.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • a non-class prvalue kann nicht const qualifizierten .
    Original:
    a non-class prvalue cannot be const-qualified.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] xWert NJ

Ein xWert ist ein Ausdruck, eine "auslaufende" Objekt, das heißt, das Objekt, das aus bewegt werden identifiziert. Die Aufgabe wird durch eine xWert Expression identifiziert kann eine namenlose temporäre sein, kann es ein benanntes Objekt in Umfang, oder jede andere Art von Objekt sein, aber wenn als Funktion Argument verwendet, xWert werden immer an den rvalue Referenz Überlastung falls vorhanden binden .
Original:
An xvalue is an expression that identifies an "expiring" object, that is, the object that may be moved from. The object identified by an xvalue expression may be a nameless temporary, it may be a named object in scope, or any other kind of object, but if used as a function argument, xvalue will always bind to the rvalue reference overload if available.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Nur die folgenden Ausdrücke sind XValues:
Original:
Only the following expressions are xvalues:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Ein Aufruf der Funktion Ausdruck, wenn die Funktion den Rückgabetyp ist ein rvalue Verweis auf Objekt-Typ, wie std::move(val)
    Original:
    A function call expression, if the function's return type is an rvalue reference to object type, such as std::move(val)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Gegossener Ausdruck rvalue Bezugnahme auf Objekttyp, wie static_cast<T&&>(val) oder (T&&)val
    Original:
    A cast expression to an rvalue reference to object type, such as static_cast<T&&>(val) or (T&&)val
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ein nicht-statisches Klassenmitglied Zugriffsausdruck, in dem das Objekt Ausdruck ist ein xWert
    Original:
    a non-static class member access expression, in which the object expression is an xvalue
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Ein Zeiger-auf-Member Ausdruck, in dem der erste Operand ist ein xWert und der zweite Operand ist ein Zeiger auf Daten Mitglied .
    Original:
    A pointer-to-member expression in which the first operand is an xvalue and the second operand is a pointer to data member.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Eigenschaften:
Original:
Properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Gleich wie rvalue (unten)
    Original:
    Same as rvalue (below)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Gleiche wie glvalue (unten)
    Original:
    Same as glvalue (below)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Wie prvalues ​​binden XValues ​​Verweise rvalue, aber im Gegensatz prvalues ​​ein xWert kann polymorphen, und ein Nicht-Klasse xWert kann cv-qualifizierten .
Original:
Like prvalues, xvalues bind to rvalue references, but unlike prvalues, an xvalue may be polymorphic, and a non-class xvalue may be cv-qualified.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Mixed Kategorien

[Bearbeiten] glvalueNJ

A glvalue ist ein Ausdruck, der entweder ein L-Wert oder ein xWert ist .
Original:
A glvalue is an expression that is either an lvalue or an xvalue.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Eigenschaften:
Original:
Properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • A glvalue kann implizit konvertiert werden, um mit lvalue-to-rvalue, array-to-pointer oder Funktion-to-Zeiger implizite Konvertierung prvalue .
    Original:
    A glvalue may be implicitly converted to prvalue with lvalue-to-rvalue, array-to-pointer, or function-to-pointer implizite Konvertierung.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • A glvalue können polymorph sein: der dynamische Typ des Objekts es identifiziert ist nicht unbedingt die statischen Typ des Ausdrucks .
    Original:
    A glvalue may be polymorphic: the dynamic type of the object it identifies is not necessarily the static type of the expression.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] rvalue NJ

Ein R-Wert ist ein Ausdruck, der entweder ein oder prvalue xWert .
Original:
An rvalue is an expression that is either a prvalue or an xvalue.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Properties (beachten Sie, diese an beide XValues ​​und prvalues ​​gelten, was bedeutet, dass sie zu den pre-C + 11 rvalues ​​sowie Aufpreis)
Original:
Properties (note, these apply to both xvalues and prvalues, which means they apply to the pre-C++11 rvalues as well)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Adresse eines rvalue dürfen nicht mitgenommen werden: &i++ und &42 und &std::move(val) sind ungültig .
    Original:
    Address of an rvalue may not be taken: &i++ and &42 and &std::move(val) are invalid.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Ein R-Wert kann Initialisieren eines const lvalue Referenz verwendet werden, in welchem ​​Fall die Lebensdauer des Objekts von dem R-Wert identifiziert, bis der Umfang der Bildnummer Enden verlängert ist .
    Original:
    An rvalue may be used to Initialisieren eines const lvalue Referenz, in which case the lifetime of the object identified by the rvalue is extended until the scope of the reference ends.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Ein R-Wert kann initialisiert eine rvalue Referenz verwendet werden, in welchem ​​Fall die Lebensdauer des Objekts von dem R-Wert identifiziert, bis der Umfang der Bildnummer Enden verlängert ist .
    Original:
    An rvalue may be used to initialisiert eine rvalue Referenz, in which case the lifetime of the object identified by the rvalue is extended until the scope of the reference ends.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Wenn als Funktion Argument verwendet und wenn zwei Überladungen der Funktion zur Verfügung stehen, wobei ein rvalue Bezugsgröße und die andere unter lvalue Verweis auf const Parameter binden rvalues ​​der rvalue Referenz Überlast (also, wenn sowohl kopieren und verschieben Konstruktoren zur Verfügung stehen, rvalue Argumente berufen sich auf die bewegen Konstruktor, und ebenfalls mit Kopieren und Verschieben Zuweisungsoperatoren) .
    Original:
    When used as a function argument and when two overloads of the function are available, one taking rvalue reference parameter and the other taking lvalue reference to const parameter, rvalues bind to the rvalue reference overload (thus, if both copy and move constructors are available, rvalue arguments invoke the bewegen Konstruktor, and likewise with copy and move assignment operators).
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Spezielle Kategorien

[Bearbeiten] Bis Mitglied Funktionsaufruf

Die Ausdrücke obj.*mfp und ptr->*mfp wo mfp ein Zeiger auf Member-Funktion ist, werden als prvalue Ausdrücke klassifiziert, aber sie können nicht verwendet werden, um Verweise zu initialisieren, als Funktionsargumente, oder für irgendeinen Zweck überhaupt werden, es sei denn der linken Argument einer Funktion Rufen Ausdruck, zB (pobj->*ptr)(args) .
Original:
The expressions obj.*mfp and ptr->*mfp where mfp is a pointer to member function, are classified as prvalue expressions, but they cannot be used to initialize references, as function arguments, or for any purpose at all, except as the left-hand argument of a function call expression, e.g. (pobj->*ptr)(args).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Rechtswidrig Ausdrücke

Funktionsaufruf Ausdrücken zurück void, warf Ausdrücke void und throw-Ausdrücke werden als prvalue Ausdrücke klassifiziert, aber sie können nicht verwendet werden, um Verweise zu initialisieren oder als Funktionsargumente werden. Sie können in einem ausrangierten-Wert-Kontext (zB auf einer eigenen Zeile, wie das linke Argument der Komma-Operator, etc) und in der return Anweisung in einer Funktion, die void verwendet werden. Zusätzlich kann Wegwerf-Ausdrücken (nicht aber andere Hohlraum prvalues) als die zweite und die dritte Operanden des Bedingungsoperator? verwendet werden .
Original:
Function call expressions returning void, cast expressions to void, and throw-expressions are classified as prvalue expressions, but they cannot be used to initialize references or as function arguments. They can be used in a discarded-value context (e.g. on a line of its own, as the left argument of the comma operator, etc) and in the return statement in a function returning void. In addition, throw-expressions (but not other void prvalues) may be used as the second and the third operands of the Bedingungsoperator?.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.