std::function::function
Da cppreference.com.
< cpp | utility | functional | function
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
function(); |
(1) | (dal C++11) |
function( std::nullptr_t ); |
(2) | (dal C++11) |
function( const function& f ); |
(3) | (dal C++11) |
function( function&& f ); |
(4) | (dal C++11) |
template< class F > function( F f ); |
(5) | (dal C++11) |
template< class Alloc > function( std::allocator_arg_t, const Alloc& alloc ); |
(6) | (dal C++11) |
template< class Alloc > function( std::allocator_arg_t, const Alloc& alloc, |
(7) | (dal C++11) |
template< class Alloc > function( std::allocator_arg_t, const Alloc& alloc, |
(8) | (dal C++11) |
template< class Alloc > function( std::allocator_arg_t, const Alloc& alloc, |
(9) | (dal C++11) |
template< class F, class Alloc > function( std::allocator_arg_t, const Alloc& alloc, F f ); |
(10) | (dal C++11) |
Costruisce un
std::function
da una varietà di fonti.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 @ Creare una funzione vuota.
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 @ Creare una copia di
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 @ Spostare il contenuto di
f
in *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 @ Spostare l'oggetto
Callable
f
in *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.
Indice |
[modifica] Parametri
f | - | l'oggetto funzione utilizzata per inizializzare *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 | - | un
Allocator utilizzato per l'allocazione di memoria interna 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. |
[modifica] Note
6-10)Costruttori che hanno un primo parametro di std::allocator_arg_t tipo deve avere un
alloc
secondo argomento di A
tipo che è un Allocator
. Questo allocatore viene utilizzato per creare la memoria per le strutture di dati interne che la function
potrebbero utilizzare.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) Il
F
tipo deve essere CopyConstructible
e f
l'oggetto deve essere Callable
. L'oggetto funzione risultante creato sarà vuoto se f
è un puntatore a funzione NULL, un puntatore NULL a membro, o se è un f
std::function e !f == true. Il f
argomento viene spostato nell'oggetto funzione risultante.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.
[modifica] Eccezioni
1-2) 3-5)(Nessuno)
6-7)
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.
You can help to correct and verify the translation. Click here for instructions.
(Nessuno)
Original:
(none)
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.
[modifica] Esempio
This section is incomplete Reason: no example |