std::reference_wrapper
![]() |
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. |
Elemento definito nell'header <functional>
|
||
template< class T > class reference_wrapper; |
(dal C++11) | |
std::reference_wrapper
Class è un CopyConstructible
e wrapper CopyAssignable
intorno ad un riferimento all'oggetto o il riferimento per un funzionamento di tipo T
. Istanze di std::reference_wrapper
sono oggetti (può essere copiato o conservati in contenitori), ma sono implicitamente convertibile T&, in modo che possano essere utilizzati come argomenti con le funzioni che richiedono il tipo sottostante per riferimento.std::reference_wrapper
is a CopyConstructible
and CopyAssignable
wrapper around a reference to object or reference to function of type T
. Instances of std::reference_wrapper
are objects (can be copied or stored in containers), but they are implicitly convertible to T&, so that they can be used as arguments with the functions that take the underlying type by reference.You can help to correct and verify the translation. Click here for instructions.
std::reference_wrapper
oggetti. You can help to correct and verify the translation. Click here for instructions.
std::reference_wrapper
viene utilizzato anche per passare gli oggetti di std::bind o al costruttore di std::thread di riferimento.std::reference_wrapper
is also used to pass objects to std::bind or to the constructor of std::thread by reference.You can help to correct and verify the translation. Click here for instructions.
Indice |
[modifica] Membri tipi
tipo
Original: type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
definition |
type
|
T
|
result_type
|
Il tipo restituito di
T T se è una funzione. Altrimenti, non definito Original: The return type of T if T is a function. Otherwise, not defined The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
argument_type
|
1) se
T è una funzione o un puntatore a funzione che prende un argomento di tipo A1 , allora argument_type è A1 .2) se T è un tipo di classe con un T::argument_type tipo di membro, quindi argument_type è un alias di questoOriginal: 1) if T is a function or pointer to function that takes one argument of type A1 , then argument_type is A1 .2) if T is a class type with a member type T::argument_type , then argument_type is an alias of thatThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
first_argument_type
|
1) se
T è una funzione o un puntatore a funzione che prende due argomenti di tipo s A1 e A2 , quindi first_argument_type è A1 .2) se Original: 1) if T is a function or pointer to function that takes two arguments of type s A1 and A2 , then first_argument_type is A1 .2) if The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
second_argument_type
|
1) se
T è una funzione o un puntatore a funzione che prende due argomenti di tipo s A1 e A2 , quindi second_argument_type è A2 .2) se T è un tipo di classe con un T::second_argument_type tipo di membro, quindi first_argument_type è un alias di questoOriginal: 1) if T is a function or pointer to function that takes two arguments of type s A1 and A2 , then second_argument_type is A2 .2) if T is a class type with a member type T::second_argument_type , then first_argument_type is an alias of thatThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |