Namespace
Varianti

std::function::function

Da cppreference.com.
< cpp‎ | utility‎ | functional‎ | function

 
 
Utilità libreria
Tipo di supporto (basic types, RTTI, type traits)
Gestione della memoria dinamica
La gestione degli errori
Programma di utilità
Funzioni variadic
Data e ora
Funzione oggetti
initializer_list(C++11)
bitset
hash(C++11)
Gli operatori relazionali
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>=
Coppie e tuple
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)
Swap, in avanti e spostare
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)
 
Funzione oggetti
Funzione wrapper
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)
Associare
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)
Wrapper di riferimento
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)
Operatore wrapper
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.
Negatori
Original:
Negators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Sconsigliata a leganti e adattatori
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(deprecato)
binary_function(deprecato)
ptr_fun(deprecato)
pointer_to_unary_function(deprecato)
pointer_to_binary_function(deprecato)
mem_fun(deprecato)
mem_fun_t
mem_fun1_t
const_mem_fun_t
const_mem_fun1_t
(deprecato)
(deprecato)
(deprecato)
(deprecato)
mem_fun_ref(deprecato)
mem_fun_ref_t
mem_fun1_ref_t
const_mem_fun_ref_t
const_mem_fun1_ref_t
(deprecato)
(deprecato)
(deprecato)
(deprecato)
binder1st
binder2nd
(deprecato)
(deprecato)
bind1st
bind2nd
(deprecato)
(deprecato)
 
std::function
Membri funzioni
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
Non membri funzioni
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)
Helper classi
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) (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,

          std::nullptr_t );
(7) (dal C++11)
template< class Alloc >

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

          const function& f );
(8) (dal C++11)
template< class Alloc >

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

          function&& f );
(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.
@ 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.
@ 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.
@ 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.
@ 5, 10 @ Spostare l'oggetto Callable f in *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.

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.
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.

[modifica] Eccezioni

1-2)
noexcept specification:  
noexcept
  (dal C++11)
3-5)
(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.
6-7)
noexcept specification:  
noexcept
  (dal C++11)
8-10)
(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.

[modifica] Esempio