Function objects
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
関数オブジェクトは関数呼び出し演算子が定義されている任意のオブジェクトです。 C++で提供する多くの組み込み関数オブジェクトだけでなく、新たな関数オブジェクトの作成と操作のためのサポート.
Original:
A function object is any object for which the function call operator is defined. C++ provides many built-in function objects as well as support for creation and manipulation of new function objects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] ポリモーフィックな関数ラッパー
std::function任意の関数オブジェクトを格納するためのサポートを提供しています.
Original:
std::function provides support for storing arbitrary function objects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
(C++11) |
指定された関数呼び出しシグネチャを持つ任意の型の呼び出し可能オブジェクトをラップします Original: wraps callable object of any type with specified function call signature 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: creates a function object out of a pointer to a member The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
(C++11) |
空のstd::functionを呼び出すときに例外がスローされます Original: the exception thrown when invoking an empty std::function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) |
[編集] バインド
std::bind新しい関数を生成する関数に部分関数適用のサポート、すなわち結合引数を提供.
Original:
std::bind provides support for 部分関数適用, i.e. binding arguments to functions to produce new functions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
(C++11) |
関数オブジェクトに1つ以上の引数をバインドします Original: binds one or more arguments to a function object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
(C++11) |
オブジェクトが std::bind 式であるか、または1として使用できることを示します Original: indicates that an object is std::bind expression or can be used as one The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
オブジェクトは、標準のプレースホルダーであることを示し、または1つとして使用することができます Original: indicates that an object is a standard placeholder or can be used as one The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
Defined in namespace
std::placeholders | |
(C++11) |
std::bind 式での非バインド引数のプレースホルダ Original: placeholders for the unbound arguments in a std::bind expression The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (定数) |
[編集] リファレンス·ラッパー
リファレンス·ラッパーは参照引数がコピー可能な関数オブジェクトに格納できるようにする:
Original:
Reference wrappers allow reference arguments to be stored in copyable function objects:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
(C++11) |
CopyConstructible とCopyAssignable 参照ラッパー Original: CopyConstructible and CopyAssignable reference wrapper The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) (C++11) |
その引数から推論型でstd::reference_wrapperを作成します Original: creates a std::reference_wrapper with a type deduced from its argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
[編集] 関数オブジェクト
C++の一般的な算術演算や論理演算を表すいくつかの関数オブジェクトを定義しています
Original:
C++ defines several function objects that represent common arithmetic and logical operations:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Original: Arithmetic operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
x + yを実装する関数オブジェクト Original: function object implementing x + y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x - yを実装する関数オブジェクト Original: function object implementing x - y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x * yを実装する関数オブジェクト Original: function object implementing x * y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x / yを実装する関数オブジェクト Original: function object implementing x / y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x % yを実装する関数オブジェクト Original: function object implementing x % y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
-xを実装する関数オブジェクト Original: function object implementing -x The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
Original: Comparisons The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
x == yを実装する関数オブジェクト Original: function object implementing x == y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x != yを実装する関数オブジェクト Original: function object implementing x != y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x > yを実装する関数オブジェクト Original: function object implementing x > y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x < yを実装する関数オブジェクト Original: function object implementing x < y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x >= yを実装する関数オブジェクト Original: function object implementing x >= y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x <= yを実装する関数オブジェクト Original: function object implementing x <= y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
Original: Logical operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
x && yを実装する関数オブジェクト Original: function object implementing x && y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x || yを実装する関数オブジェクト Original: function object implementing x || y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
!xを実装する関数オブジェクト Original: function object implementing !x The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
Original: Bitwise operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
x & yを実装する関数オブジェクト Original: function object implementing x & y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x | yを実装する関数オブジェクト Original: function object implementing x | y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
x ^ yを実装する関数オブジェクト Original: function object implementing x ^ y The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
Original: Negators The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
ラッパー関数オブジェクトは、それが保持単項述語の補集合を返す Original: wrapper function object returning the complement of the unary predicate it holds The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
ラッパー関数オブジェクトは、それが保持するバイナリ述語の補数を返す Original: wrapper function object returning the complement of the binary predicate it holds The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
カスタムstd::unary_negateオブジェクトを作成します Original: constructs custom std::unary_negate object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
カスタムstd::binary_negateオブジェクトを作成します Original: constructs custom std::binary_negate object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
[編集] C++11で非推奨
早期の機能のサポートを提供し、いくつかのユーティリティは、C++11で非推奨になっています
Original:
Several utilities that provided early functional support are deprecated in C++11:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Original: Base The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(廃止予定) |
アダプタと互換性の単項関数基底クラス Original: adaptor-compatible unary function base class The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(廃止予定) |
アダプタと互換性のあるバイナリ関数基底クラス Original: adaptor-compatible binary function base class The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
Original: Binders The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(廃止予定) (廃止予定) |
バイナリ関数およびその引数の1を保持する関数オブジェクト Original: function object holding a binary function and one of its arguments The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(廃止予定) (廃止予定) |
バイナリ関数に1つの引数をバインドします Original: binds one argument to a binary function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
Original: Function adaptors The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
単項関数へのポインタのためのアダプターと互換性のあるラッパー Original: adaptor-compatible wrapper for a pointer to unary function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
バイナリ関数へのポインタのためのアダプターと互換性のあるラッパー Original: adaptor-compatible wrapper for a pointer to binary function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
(廃止予定) |
関数へのポインタからアダプタと互換性のある関数オブジェクトのラッパーを作成します Original: creates an adaptor-compatible function object wrapper from a pointer 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: wrapper for a pointer to nullary member function, callable with a pointer to object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(廃止予定) |
オブジェクトへのポインタで呼び出し、メンバ関数へのポインタのラッパーを作成します Original: creates a wrapper from a pointer to member function, callable with a pointer to object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
(廃止予定) (廃止予定) (廃止予定) (廃止予定) |
無引数または単項メンバ関数へのポインタのwapper、オブジェクトへの参照を持つ呼び出し可能 Original: wapper for a pointer to nullary or unary member function, callable with a reference to object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(廃止予定) |
オブジェクトへの参照を持つ呼び出し、メンバ関数へのポインタのラッパーを作成します Original: creates a wrapper from a pointer to member function, callable with a reference to object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |