名前空間
変種
操作

std::function::function

提供: cppreference.com
< cpp‎ | utility‎ | functional‎ | function

 
 
ユーティリティライブラリ
支援を入力します (basic types, RTTI, type traits)
動的なメモリ管理
エラー処理
プログラムユーティリティ
可変個引数関数
日付と時刻
関数オブジェクト
initializer_list(C++11)
bitset
hash(C++11)
関係演算子
Original:
Relational operators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
ペアとタプル
Original:
Pairs and tuples
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pair
tuple(C++11)
piecewise_construct_t(C++11)
piecewise_construct(C++11)
フォワード、スワップ、および移動
Original:
Swap, forward and move
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap
forward(C++11)
move(C++11)
move_if_noexcept(C++11)
declval(C++11)
 
関数オブジェクト
関数ラッパー
Original:
Function wrappers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
function(C++11)
mem_fn(C++11)
bad_function_call(C++11)
バインド
Original:
Bind
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bind(C++11)
is_bind_expression(C++11)
is_placeholder(C++11)
_1, _2, _3, ...(C++11)
リファレンス·ラッパー
Original:
Reference wrappers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reference_wrapper(C++11)
ref
cref
(C++11)
(C++11)
オペレーターのラッパー
Original:
Operator wrappers
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:
Deprecated binders and adaptors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unary_function(廃止予定)
binary_function(廃止予定)
ptr_fun(廃止予定)
pointer_to_unary_function(廃止予定)
pointer_to_binary_function(廃止予定)
mem_fun(廃止予定)
mem_fun_t
mem_fun1_t
const_mem_fun_t
const_mem_fun1_t
(廃止予定)
(廃止予定)
(廃止予定)
(廃止予定)
mem_fun_ref(廃止予定)
mem_fun_ref_t
mem_fun1_ref_t
const_mem_fun_ref_t
const_mem_fun1_ref_t
(廃止予定)
(廃止予定)
(廃止予定)
(廃止予定)
binder1st
binder2nd
(廃止予定)
(廃止予定)
bind1st
bind2nd
(廃止予定)
(廃止予定)
 
std::function
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
function::function
function::~function
function::operator=
function::swap
function::assign
function::operator bool
function::operator()
function::target_type
function::target
非メンバ関数
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator==
operator!=
std::swap(std::function)
ヘルパークラス
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::uses_allocator<std::function>
 
function();
(1) (C++11およびそれ以降)
function( std::nullptr_t );
(2) (C++11およびそれ以降)
function( const function& f );
(3) (C++11およびそれ以降)
function( function&& f );
(4) (C++11およびそれ以降)
template< class F >
function( F f );
(5) (C++11およびそれ以降)
template< class Alloc >
function( std::allocator_arg_t, const Alloc& alloc );
(6) (C++11およびそれ以降)
template< class Alloc >

function( std::allocator_arg_t, const Alloc& alloc,

          std::nullptr_t );
(7) (C++11およびそれ以降)
template< class Alloc >

function( std::allocator_arg_t, const Alloc& alloc,

          const function& f );
(8) (C++11およびそれ以降)
template< class Alloc >

function( std::allocator_arg_t, const Alloc& alloc,

          function&& f );
(9) (C++11およびそれ以降)
template< class F, class Alloc >
function( std::allocator_arg_t, const Alloc& alloc, F f );
(10) (C++11およびそれ以降)
さまざまなソースからのstd::functionを構築し.
Original:
Constructs a std::function from a variety of sources.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
@ 1、2、7 @空の関数を作成します.
Original:
@1, 2, 7@ Create an empty function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
@ 3,8 @fのコピーを作成します.
Original:
@3, 8@ Create a copy of f.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
@ 4,9 @f*thisの内容を移動.
Original:
@4, 9@ Move the contents of f into *this.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
@ 5、10 @Callablef*thisオブジェクトを移動.
Original:
@5, 10@ Move the Callable object f into *this.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] パラメータ

f -
*thisを初期化するために使用する関数オブジェクト
Original:
the function object used to initialize *this
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alloc -
内部メモリ割り当てに使用Allocator
Original:
an Allocator used for internal memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] ノート

6-10)
タイプstd::allocator_arg_tの最初のパラメータを持っているコンストラクタはallocあるタイプAの第2引数Allocatorを持っている必要があります。このアロケータはfunctionが使用する可能性のあるすべての内部データ構造にメモリを作成するために使用され.
Original:
Constructors that have a first parameter of type std::allocator_arg_t must have a second argument alloc of type A that is an Allocator. This allocator is used to create memory for any internal data structures that the function might use.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5、10)タイプFCopyConstructibleであるべきであり、オブジェクトfCallableでなければなりません。 fがNULL関数ポインタ、メンバへのNULLポインターの場合、またはf場合はstd::functionあると!f == trueた場合に作成された関数オブジェクトは空になります。引数fは、得られた関数オブジェクトに移動されます.
Original:
5, 10) The type F should be CopyConstructible and the object f should be Callable. The resulting function object that is created will be empty if f is a NULL function pointer, a NULL pointer to member, or if f is a std::function and !f == true. The argument f is moved into the resulting function object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 例外

1-2)
noexcept specification:  
noexcept
  (C++11およびそれ以降)
3-5)
(なし)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6-7)
noexcept specification:  
noexcept
  (C++11およびそれ以降)
8-10)
(なし)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集]