名前空間
変種
操作

Member access operators

提供: 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.
インラインアセンブリ
 
オブジェクトのメンバにアクセスする.
Original:
Accesses a member of an object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operator name Syntax Over​load​able Prototype examples (for class T)
Inside class definition Outside class definition
array subscript a[b] Yes R& T::operator[](const T2& b); N/A
indirection (variable pointed to by a) *a Yes R& T::operator*(); R& operator*(T &a);
address of &a Yes R* T::operator&(); R* operator&(T &a);
member of object a.b No N/A N/A
member of pointer a->b Yes R* T::operator->() N/A
pointer to member of object a.*b No N/A N/A
pointer to member of pointer a->*b Yes R* T::operator->*(R) R* T::operator->*(T, R)
'注意'
Original:
Notes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • ほとんどのユーザ定義のオーバーロードと同じように、戻り値の型は、ユーザー定義演算子は組み込みと同じように使用することができるように組み込みの事業者が提供する戻り値の型と一致する必要があります。ただし、ユーザー定義演算子のオーバーロードでは、任意の型、戻り値の型(voidを含む)として使用することができます。唯一の例外は、ポインタを返す必要がありますoperator->、です.
    Original:
    As with most user-defined overloads, return types should match return types provided by the builtin operators so that the user-defined operators can be used in the same manner as the built-ins. However, in a user-defined operator overload, any type can be used as return type (including void). One exception is operator->, which must return a pointer.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

目次

[編集] 説明

'配列の添字演算子は、内部配列の要素へのアクセスを提供します
Original:
array subscript operator provides access to the elements in the internal array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
イレポインタのメンバとポインタのメンバへのポインタ'演算子は任意のオブジェクトのポインタのセマンティクスを提供.
Original:
indirection, member of pointer and pointer to member of pointer operators provide pointer semantics for any object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ポインタのメンバーとポインタのメンバへのポインタ'演算子は、メンバへのアクセスに使用される実際のオブジェクトへのポインタを返す.
Original:
member of pointer and pointer to member of pointer operators return a pointer to the actual object which will be used for member access.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 作り付けの添字演算子

すべてのオブジェクト型T(多分CV修飾名でも可)については、次の関数のシグネチャは、オーバーロードの解決に参加しています
Original:
For every object type T (possibly cv-qualified), the following function signature participates in overload resolution:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
T& operator[](T*, std::ptrdiff_t);
T& operator[](std::ptrdiff_t, T*);
非ポインタオペランドは整数型またはスコープを持たない列挙型のいずれかの表現かもしれないが、それは暗黙的に変換されますstd::ptrdiff_tです。表現A[B]が表現*(A+B)、とまったく同じですが、ポインタオペランド(配列からポインタへの変換の結果であるかもしれないし、どれがいくつかの配列または末尾過去1の要素を指していなければならない)に調整されている同じ配列の別の要素にポイント、ポインタ演算の規則に従って、次に間接参照され.
Original:
The non-pointer operand may be any expression of integral or unscoped enumeration type, it is 暗黙的に変換されます to std::ptrdiff_t. The expression A[B] is exactly identical to the expression *(A+B), that is, the pointer operand (which may be a result of array-to-pointer conversion, and which must point to an element of some array or one past the end) is adjusted to point at another element of the same array, following the rules of ポインタ演算, and is then dereferenced.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>
 
int main()
{
    int a[4] = {1,2,3,4};
    int* p = &a[2];
    std::cout << p[1] << p[-1] << 1[p] << (-1)[p] << '\n';
}

Output:

4242

[編集] 作り付けの間接演算子

オブジェクト型(おそらくCV修飾)や関数型(のconstまたはref修飾されていない)のいずれかであるあらゆるタイプTは、次の関数のシグネチャは、オーバーロードの解決に参加しています
Original:
For every type T that is either object type (possibly cv-qualified) or function type (not const- or ref-qualified), the following function signature participates in overload resolution:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
T& operator*(T*);
ビルトイン間接演算子のオペランドは、オブジェクトまたは関数へのポインタであり、この結果は、ポインタが指していることを左辺値です。不完全型へのポインタを逆参照できることに注意して、例えば参照を初期化するとき.
Original:
The operand of the built-in indirection operator is a pointer to object or function, and the result is the lvalue that the pointer is pointing at. Note that a pointer to incomplete type can be dereferenced, e.g. when initializing a reference.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>
int f() { return 42; }
int main()
{
    int n = 1;
    int* pn = &n;
 
    int& r = *pn;  // lvalue can be bound to a reference
    int m = *pn;   // indirection + lvalue-to-rvalue conversion
 
    int (*fp)() = &f;
    int (&fr)() = *fp; // function lvalue can be bound to a reference 
}


[編集] 作り付けのアドレス演算子

operator&ビルトインのオペランドは任意のタイプまたはいくつかのクラスの非静的メンバ関数/オブジェクトの修飾名の左辺値式のいずれかです。この演算子は、オーバーロードの解決に参加していない、特別なルールが使用されます
Original:
The operand of the built-in operator& is either an lvalue expression of any type or the qualified name of a non-static member function/object in some class. This operator does not participate in overload resolution, special rules are used:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
オペランドには、いくつかのタイプTの左辺値式である場合、operator&オペランドによって指定されたオブジェクトを指しているのと同じCVの資格、で、型がT*のprvalueを作成し、返します。オペランドに不完全型を持っている場合は、ポインタを形成することができるが、それは不完全型で独自operator&を定義しているクラスであることを起こる場合、動作は未定義です。ユーザー定義型とoperator&のオペランドでは、std::addressofは真のポインタを取得するために使用されるかもしれません.
Original:
If the operand is an lvalue expression of some type T, operator& creates and returns a prvalue of type T*, with the same cv qualification, that is pointing at the object designated by the operand. If the operand has incomplete type, the pointer can be formed, but if that incomplete type happens to be a class that defines its own operator&, the behavior is undefined. For the operands of type with user-defined operator&, std::addressof may be used to obtain the true pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
オペランドは、オーバーロードされた関数の名前である場合、過負荷が原因でキャスト式では、オブジェクトを初期化するために使用される'operator&の結果であるコンテキストに解決することができれば、アドレスは限り、採ることができる、代入式の左辺で、関数のパラメータとして、またはreturn文の.
Original:
If the operand is the name of an overloaded function, the address may be taken only if the overload can be resolved due to context, that is, the result of operator& is used to initialize an object, in a cast expression, on the left of an assignment, as a function parameter or in a return statement.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
オペランドは非静的メンバなどの修飾名である場合&Class::member、結果はクラスTでタイプCのメンバオブジェクトへのメンバ関数やポインタへprvalueポインタです。どちらも&memberClass::memberさえも(&Class::member)がメンバへのポインタを初期化するために使用することに注意してください.
Original:
If the operand is a qualified name of a non-static member, e.g. &Class::member, the result is a prvalue pointer to member function or pointer to member object of type T in class C. Note that neither &member nor Class::member nor even (&Class::member) may be used to initialize a pointer to member.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
void f(int) {}
void f(double) {}
struct A { int i; };
struct B { void f(); };
int main()
{
    int n = 1;
    int* pn = &n; // pointer
    int A::* mp = &A::i;  // pointer to member object
    void (B::*mpf)() = &B::f; // pointer to member function
 
//    auto pf2 = &f; // error: ambiguous overloaded function type
    void (*pf)(int) = &f; // overload resolution due to initialization
    auto pf2 = static_cast<void(*)(int)>(&f); // overload resolution due to cast
}


[編集] 作り付けのメンバアクセス演算子

のビルトインoperator.operator->演算子が呼び出される前に評価されたクラス型Toperator.ために、完了するために完全なクラス型T*operator->の場合)またはポインタの表現である。左オペランド、右オペランドが名前ですTのまたはTの基本クラスのいずれかのメンバオブジェクトまたはメンバ関数の、例えばexpr.member、オプションキーワードが前置する必要に応じて修飾、例えばexpr.name::member、'テンプレート、例えばexpr.template member.
Original:
The left operand of the built-in operator. and operator-> is an expression of complete class type T (for operator.) or pointer to complete class type T* (for operator->, which is evaluated before the operator can be called. The right operand is the name of a member object or member function of T or of one of T's base classes, e.g. expr.member, optionally qualified, e.g. expr.name::member, optionally prepended by the keyword template, e.g. expr.template member.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
表現A->Bは完全に等価です(*A).B組み込み型に対するユーザー定義のoperator->が提供されている場合operator->はプレーンポインタを返すことに到達するまで、operator->は、再帰的に、それが返す値に再度呼び出されます。その後、組み込みのセマンティクスが、そのポインタに適用されます.
Original:
The expression A->B is exactly equivalent to (*A).B for builtin types. If a user-defined operator-> is provided, operator-> is called again on the value that it returns, recursively, until the operator-> is reached that returns a plain pointer. After that, builtin semantics are applied to that pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
表現expr.Bでは、
Original:
In the expression expr.B,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
BがタイプT&を持っている場合、結果は左辺値でT.
Original:
if B has type T&, the result is an lvalue T.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
BがタイプTの静的データメンバである場合、結果は左辺値がTその静的なデータメ​​ンバを指定している.
Original:
if B is a static data member of type T, the result is an lvalue T designating that static data member.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
BがタイプTの非静的データメンバである場合、結果は左辺値である場合expr左辺値であり、結果がある場合にはxValueexprはxValue、結果はそうでなければprvalueです。Bがに宣言されていない場合' mutableなメンバであることが、結果のcv-修飾はexprBBが可変である場合、結果のcv-修飾がvolatileで資格の組合です.
Original:
if B is a non-static data member of type T, the result is an lvalue if expr is an lvalue, the result is xvalue if expr is an xvalue, and the result is a prvalue otherwise. If B is not declared to be a mutable member, the cv-qualification of the result is the union of cv-qualifications of expr and B. If B is mutable, the cv-qualification of the result is the union of volatile-qualifications.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Bは静的メンバ関数である場合、その結果は静的メンバ関数を指す左辺値です。本質的に、exprが評価され、この場合には破棄されます
Original:
if B is a static member function, the result is an lvalue designating the static memeber function. Essentially, expr is evaluated and discarded in this case.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
Bは、非静的メンバ関数である場合、結果は、関数呼び出し式の中の左側のオペランドとして使用することができprvalueの特別な種類であり、いかなる他の目的のために。.
Original:
if B is a non-static member function, the result is a special kind of prvalue that can only be used as the left-hand operand in a function-call expression, and for no other purpose.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
Bがメンバー列挙体である場合、結果はのprvalueです.
Original:
if B is a member enumeration, the result is a prvalue of the.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
7)
Bは、ネストされた型である場合、プログラムは不適格である(コンパイルされません)
Original:
if B is a nested type, the program is ill-formed (won't compile)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
8)
exprは非クラススカラー型とBを持っている場合、同じタイプ(マイナスCV-資格)、結果を指定した型名またはdecltype指定子です特殊のみの関数呼び出し式で左辺のオペランドとして使用することができprvalueの一種であり、他の目的のためです。関数呼び出しが呼び出される疑似デストラクタ呼び出し 'は、それが返すvoid、引数をとらず、との最初の評価以外のアクションを実行しませんexpr.
Original:
if expr has non-class scalar type and B is the type name or decltype specifier designating the same type (minus cv-qualifications), then the result is a special kind of prvalue that can only be used as the left-hand operand in a function-call expression, and for no other purpose. The function call is called pseudo destructor call', it takes no arguments, returns void, and performs no action other than initial evaluation of expr.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>
template<typename T>
struct P { typedef T* ptr; };
template<typename T>
struct A {
    class B {};
    enum E {RED = 1, BLUE = 2};
    int n;
    static int sn;
    int f() { return 10+n; }
    static int fs() { return 4; }
    A(int n) : n(n) {}
 
    // keyword template needed to refer to a dependent template member
    void g() {
        T obj;
        int* p = obj.template ptr<int>;
        p->~T(); // T is int, this calls int's pseudo destructor
    }
};
template<> int A<P<int>>::sn = 2;
 
int main()
{
    A<P<int>> a(1);
    std::cout << a.n << ' '
              << a.sn << ' ' // << A::sn also works
              << a.f() << ' ' 
              << a.fs() << ' ' // A::fs() also works
              << a.RED << ' '  // nested type not allowed
//            << a.B  // nested type not allowed
              ;
}

Output:

1 2 11 4 1

[編集] 作り付けのポインタからメンバへのアクセス演算子

operator.*operator->*両方の右オペランドがクラスのメンバへのポインタ型の式であるToperator.*は、左のオペランドがクラス型Tの表現であるか、のTがあいまいアクセス拠点となっているいくつかの派生クラス。operator->*は、左オペランドがTへまたはそのベースへのポインタである.
Original:
The right operand of both operator.* and operator->* is an expression of type pointer to member in class T. For operator.*, the left operand is an expression of class type T, or of some derived class in which T is unambiguous accessible base. For operator->*, the left operand is a pointer to T or to its base.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
種類のあらゆる組み合わせBDTDどちらかBと同じであるか、についてBから派生したクラス、そしてTは、オブジェクトまたは関数型である場合は、次の関数のシグネチャは、オーバーロードの解決に参加しています
Original:
For every combination of types B, D, T, where D is either the same as B or a class derived from B, and T is either object or function type, the following function signature participates in overload resolution:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
T& operator->*(B*, T D::*);
両方のオペランドがCV修飾することができ、戻り値の型のCV-資格は、労働組合のある場合にはオペランドのcv-資格.
Original:
where both operands may be cv-qualified, in which case the return type's cv-qualification is the union of the cv-qualification of the operands.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
表現E1->*E2は、ビルトインタイプの(*E1).*E2とまったく同じです.
Original:
The expression E1->*E2 is exactly equivalent to (*E1).*E2 for built-in types.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
表現expr.*ptrについては、
Original:
For the expression expr.*ptr,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
exprの動的タイプは、ptrが参照するメンバが含まれていない場合、動作は未定義です
Original:
If the dynamic type of expr does not contain the member to which ptr refers, the behavior is undefined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
CV-資格の規則は、1つの追加ルールで、メンバアクセス演算子と同じです:。mutableメンバーはconstオブジェクトにそのメンバーを変更するために使用することができません.
Original:
cv-qualification rules are the same as for member access operator, with one additional rule: a pointer to member that refers to a mutable member cannot be used to modify that member in a const object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
を指すメンバへのポインタ。場合expr&refの修飾子を持つメンバ関数への右辺値とptrポイント、プログラムは不適格である
Original:
If expr is rvalue and ptr points to a member function with & ref-qualifier, the program is ill-formed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
&& refの修飾子を持つメンバ関数にlvalueとexprポイントですptr、プログラムが悪い形成されている場合
Original:
If expr is lvalue and ptr points to a member function with && ref-qualifier, the program is ill-formed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
expr.*ptrは、データメンバへのポインタであるptrの結果が同じ値のカテゴリがありexpr.
Original:
The result of expr.*ptr where ptr is a pointer to data member has the same value category as expr.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
7)
expr.*ptrは、メンバ関数へのポインタですptrの結果は、としてのみ使用することがprvalue specailの一種である関数呼び出し式の、それ以外の目的のために左側の引数.
Original:
The result of expr.*ptr where ptr is a pointer to member function is a specail kind of prvalue that may only be used as the left-hand argument of a function call expression and for no other purpose.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
8)
ptrヌルポインタの値である場合、動作は未定義です
Original:
If ptr is a null pointer value, the behavior is undefined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>
struct S
{
    mutable int mi;
    int f(int n) { return mi+n; }
    S(int n) : mi(n) {}
};
struct D : public S {
        D(int n) : S(n) {}
};
 
int main()
{
    int S::* pmi = &S::mi;
    int (S::*mpf)(int) = &S::f;
 
    const S s(7);
//    s.*pmi = 10; // cannot modify through mutable
    std::cout << s.*pmi << '\n';
 
    D d(7); // base pointers work with derived object
    D* dp = &d;
    std::cout << (d.*mpf)(7) << ' '
              << (dp->*mpf)(8) << '\n';
}

Output:

7
14 15

[編集] 標準ライブラリ

添字演算子は、多くの標準的なコンテナクラスでオーバーロードされています
Original:
Subscript operator is overloaded by many standard container classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
特定のビットにアクセスします
Original:
accesses specific bit
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::bitset) [edit]
マネージ配列へのインデックスアクセスを提供します。整数または浮動小数点値に
Original:
provides indexed access to the managed array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::unique_ptr) [edit]
指定した文字にアクセスします
Original:
access specified character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::basic_string) [edit]
指定された要素にアクセスします
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::array) [edit]
指定された要素にアクセスします
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::deque) [edit]
指定された要素にアクセスします
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::vector) [edit]
指定された要素にアクセスします
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::map) [edit]
指定された要素にアクセスします
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::unordered_map) [edit]
インデックスで要素にアクセスします
Original:
accesses an element by index
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::reverse_iterator) [edit]
インデックス要素に右辺値参照を取得します
Original:
obtains rvalue reference to indexed element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::move_iterator)
valarrayの要素、スライス、またはマスクを設定/取得する
Original:
get/set valarray element, slice, or mask
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::valarray) [edit]
指定されたサブマッチが返されます
Original:
returns specified sub-match
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::match_results) [edit]
間接およびメンバアクセス演算子は、多くのイテレータとスマートポインタクラスによってオーバーロードされています
Original:
The indirection and member access operators are overloaded by many iterators and smart pointer classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
管理対象オブジェクトへの間接参照はポインタ
Original:
dereferences pointer to the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::unique_ptr) [edit]
管理対象オブジェクトへの間接参照はポインタ
Original:
dereferences pointer to the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::shared_ptr) [edit]
管理対象オブジェクトにアクセスします
Original:
accesses the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::auto_ptr)
このraw_storage_iteratorへの参照を返します
Original:
returns a reference to this raw_storage_iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::raw_storage_iterator)
間接参照デクリメント基礎イテレータ
Original:
dereferences the decremented underlying iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::reverse_iterator) [edit]
no-op
(パブリックメンバ関数of std::back_insert_iterator)
no-op
(パブリックメンバ関数of std::front_insert_iterator)
no-op
(パブリックメンバ関数of std::insert_iterator)
尖ったトゥ要素にアクセスします
Original:
accesses the pointed-to element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::move_iterator)
現在のコピーが現在の要素のメンバーをelement
accesses取得します
Original:
obtains a copy of the current element
accesses a member of the current element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::istream_iterator)
no-op
(パブリックメンバ関数of std::ostream_iterator)

(C++11およびそれ以降)

はメンバーを持っている場合は、現在のコピーは、現在の文字のメンバーcharacterCharTaccesses取得します
Original:
obtains a copy of the current character
accesses a member of the current character, if CharT has members
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::istreambuf_iterator)
no-op
(パブリックメンバ関数of std::ostreambuf_iterator)
電流が現在のマッチのメンバーをmatch
accessesアクセスします
Original:
accesses the current match
accesses a member of the current match
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::regex_iterator)
電流は結果のメンバーresult
accessesアクセスします
Original:
accesses the current result
accesses a member of the current result
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数of std::regex_token_iterator)
{{{1}}}
Original:
{{{2}}}
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] も参照してください

演算子の優先順位

Common operators
代入 incrementNJdecrement 算術 論理 比較 memberNJaccess 他の

a = b
a = rvalue
a += b
a -= b
a *= b
a /= b
a %= b
a &= b
a |= b
a ^= b
a <<= b
a >>= b

++a
--a
a++
a--

+a
-a
a + b
a - b
a * b
a / b
a % b
~a
a & b
a | b
a ^ b
a << b
a >> b

!a
a && b
a || b

a == b
a != b
a < b
a > b
a <= b
a >= b

a[b]
*a
&a
a->b
a.b
a->*b
a.*b

a(...)
a, b
(type) a
? :

Special operators
static_cast別の互換性のあるタイプ
に1型に変換します
Original:
static_cast converts one type to another compatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dynamic_cast派生class
に仮想基底クラスに変換します
Original:
dynamic_cast converts virtual base class to derived class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
const_cast異なるcvqualifiers
と互換性のある型に型変換されます
Original:
const_cast converts type to compatible type with different cv qualifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reinterpret_cast互換性type
に型を変換します
Original:
reinterpret_cast converts type to incompatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
new割り当てmemory
Original:
new allocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
delete割り当て解除memory
Original:
delete deallocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeoftype
のサイズを照会します
Original:
sizeof queries the size of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof...パラメーターパック(C++11およびそれ以降)
のサイズを照会します
Original:
sizeof... queries the size of a パラメーターパック (C++11およびそれ以降)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typeidtype
の型情報を照会します
Original:
typeid queries the type information of a type
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:
noexcept checks if an expression can throw an exception (C++11およびそれ以降)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alignofタイプ(C++11およびそれ以降)のクエリアラインメント要件を
Original:
alignof queries alignment requirements of a type (C++11およびそれ以降)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.