名前空間
変種
操作

Value categories

提供: cppreference.com
< cpp‎ | language

 
 
C + +言語
一般的なトピック
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.
フロー制御
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.
条件付き実行文
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.
繰り返し文
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.
文をジャンプします
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.
機能します
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
関数の宣言
ラムダ関数の宣言
関数テンプレート
の歴史。インライン指定
例外仕様 (廃止予定)
noexcept指定子 (C++11)
例外
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
名前空間
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
タイプ
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)
指定子
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指定
貯蔵期間指定
constexprの指定子 (C++11)
自動指定 (C++11)
alignas指定子 (C++11)
初期化
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
リテラル
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
値カテゴリ
評価の順序
代替表現
ユーティリティ
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
タイプ
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
型の別名宣言 (C++11)
属性 (C++11)
キャストします
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
暗黙の型変換
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Cスタイルキャストと機能
メモリの割り当て
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.
クラス
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
クラス固有の機能特性
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.
明示 (C++11)
静的
特殊なメンバ関数
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.
テンプレート
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
クラステンプレート
関数テンプレート
テンプレートの特殊化
パラメーターパック (C++11)
その他
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
インラインアセンブリ
 
C + +の式(その引数と演算子)が評価されると、それはいくつかの非参照型の値を生成するそれぞれの式は、プライマリ値カテゴリのちょうど1つに属している.
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.

目次

[編集] 主要なカテゴリ

[編集] 左辺値

'左辺値の非一時的なオブジェクトや非メンバ関数を識別する式です.
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.
次の式は左辺値は以下の通りです
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.
  • かかわらず、そのようなstd::cinまたはstd::endlなどのタイプの適用範囲内のオブジェクトまたは関数の名前です。オブジェクトの型が右辺値参照であっても、その名前から成る式は左辺値式です.
    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.
  • そのようなstd::getline(cin, str)として関数呼び出しまたは演算式や関数の演算子の戻り値の型が左辺値参照である場合、またはcout << 1またはまたは++nまたは*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.
  • 左辺値参照型に式をキャスト.
    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.
  • 関数の戻り値の型が関数型(まれ)に右辺値参照である場合、関数呼び出し式
    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.
  • 関数への参照を右辺値に式をキャスト.
    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.
プロパティ:
Original:
Properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • glvalue(下記参照)と同じです
    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.
  • 左辺値のアドレスが使用されることがあります。&++i&std::endl有効な式です。.
    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.
  • 変更可能な左辺値は、組み込みの代入演算子の最初の(左)の引数として使用されるかもしれません.
    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.
  • 左辺値は左辺値参照を初期化しますに使用されるかもしれませんが、この仲間の式によって識別されたオブジェクトを持つ新しい名前.
    Original:
    An lvalue may be used to 左辺値参照を初期化します; 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.

[編集] 右辺NJ/ prvalueNJ

' prvalue一時オブジェクト(またはそのサブオブジェクト)を識別するか、または任意のオブジェクトに関連付けられていない値である式です.
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.
次の式は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.
  • 42またはtrueまたは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.
  • 関数呼び出し演算子/関数の表現または演算子の戻り値の型は、このようなstr.substr(1, 2)または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.
  • 参照型以外の型に式をキャスト.
    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.
  • そのような [](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.
プロパティ:
Original:
Properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • 右辺値(下記参照)と同じです
    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.
  • prvalueは、ポリモーフィックにすることはできません:それが識別するオブジェクトの動的な型は常に式のタイプです.
    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.
  • 非クラスprvalueはconstで修飾することはできません.
    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.

[編集] のxValueNJ

はxValue "期限切れ"オブジェクト、つまり、から移動することができるオブジェクトを識別する式です。のxValue式によって識別されるオブジェクトは無名の一時的かもしれないが、それはスコープの指定されたオブジェクト、または他の種類のオブジェクトであってもよいが、関数の引数として使用する場合は利用可能な場合はxValueは常に右辺値参照のオーバーロードにバインドします。.
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.
唯一の次の式は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.
  • 関数呼び出し式、関数の戻り値の型は、このような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.
  • などのオブジェクト型への右辺値参照にキャスト式、static_cast<T&&>(val)または(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.
  • オブジェクト式がのxValueである非静的クラスメンバアクセス式、
    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.
  • 最初のオペランドが2番目のオペランドはxValueであるメンバへのポインタ式がデータメンバへのポインタです.
    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.
プロパティ:
Original:
Properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • 右辺値(下記参照)と同じです
    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.
  • glvalue(下記参照)と同じです
    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.
prvalues​​同様、xvalues​​、参照を右辺値にバインドしますが、prvalues​​とは異なり、のxValueは多型であってもよく、非クラスのxValueがCV修飾することができます.
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.

[編集] 混合されたカテゴリ

[編集] glvalueNJ

glvalueか左辺値かはxValue式です.
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.
プロパティ:
Original:
Properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • glvalueは暗黙的に左辺値から右辺値、配列からポインタ、または関数へのポインタ暗黙の型変換とprvalueに変換されることがあり.
    Original:
    A glvalue may be implicitly converted to prvalue with lvalue-to-rvalue, array-to-pointer, or function-to-pointer 暗黙の型変換.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • glvalueは多型かもしれません:それが識別するオブジェクトの動的な型は、式の静的な型である必要はありません.
    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.

[編集] 右辺NJ

右辺値のいずれかまたはprvalueのxValue式です.
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.
プロパティ(彼らは同様に、事前のC + 11右辺値に適用されることに注意してください、これらはxvalues​​とprvalues​​の両方に適用されます)
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.
  • 右辺値のアドレスを取得できない場合があります。&i++&42&std::move(val)無効です.
    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.
  • 右辺値は右辺値で識別されるオブジェクトの寿命は、基準端の範囲まで拡張される場合には、のconst左辺値参照を初期化しますに使用されるかもしれません.
    Original:
    An rvalue may be used to のconst左辺値参照を初期化します, 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.
  • 右辺値は右辺値で識別されるオブジェクトの寿命は、基準端の範囲まで拡張される場合には、右辺値参照を初期化しますに使用されるかもしれません.
    Original:
    An rvalue may be used to 右辺値参照を初期化します, 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.
  • コピーとムーブコンストラクタの両方が利用可能な場合は、関数の引数として使われ、関数の2つのオーバーロードが使用可能になったとき、人は右辺値参照のパラメータを取ると、他のは、constパラメータに左辺値参照を取るときは、右辺値は右辺値参照のオーバーロード(したがって、結合する右辺の引数)がコンストラクタに移動しますを呼び出し、同様にコピーしてと代入演算子を移動.
    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 コンストラクタに移動します, 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.

[編集] 特別なカテゴリ

[編集] 保留中のメンバ関数呼び出し

表現obj.*mfpptr->*mfpmfpがメンバ関数へのポインタである場合、関数の左側の引数があるものを除き、prvalue式として分類されますが、関数の引数として、またはまったくいかなる目的のために、参照を初期化するために使用することはできません呼び出し発現、例えば(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.

[編集] ボイド式

voidvoidに式をキャストし、式を投げを返す関数呼び出し式はprvalue式として分類されますが、それらは参照を初期化したり、関数の引数として使用することはできません。彼らは捨て値のコンテキスト(カンマ演算子の左側の引数などとして、独自の線のように)とreturnを返す関数でvoid文で使用することができます。また、スロー式(ただし、他​​のボイドprvalues​​)は第二と第三条件演算子?:のオペランドとして使用することができる.
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 条件演算子?:.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.