std::function::function
提供: cppreference.com
< cpp | utility | functional | function
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
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, |
(7) | (C++11およびそれ以降) |
template< class Alloc > function( std::allocator_arg_t, const Alloc& alloc, |
(8) | (C++11およびそれ以降) |
template< class Alloc > function( std::allocator_arg_t, const Alloc& alloc, |
(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.
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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
@ 5、10 @
Callable
f
に*thisオブジェクトを移動.Original:
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.
目次 |
[編集] パラメータ
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.
You can help to correct and verify the translation. Click here for instructions.
5、10)タイプ
F
はCopyConstructible
であるべきであり、オブジェクトf
はCallable
でなければなりません。 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.
You can help to correct and verify the translation. Click here for instructions.
[編集] 例外
1-2)3-5) (なし)
6-7)8-10) (なし)
[編集] 例
This section is incomplete Reason: no example |