std::uses_allocator<std::tuple>
Da cppreference.com.
![]() |
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 <tuple>
|
||
template< class... Types, class Alloc > struct uses_allocator< std::tuple<Types...>, Alloc > : std::true_type { }; |
(dal C++11) | |
Questa specializzazione di std::uses_allocator informa componenti di libreria altre tuple sostegno uso-allocatore di costruzione, anche se non si dispone di un
allocator_type
nidificato.Original:
This specialization of std::uses_allocator informs other library components that tuples support uses-allocator construction, even though they do not have a nested
allocator_type
.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 |
Inherited from std::integral_constant
Member constants
value [statico] |
true (pubblico membro statico costante) |
Member functions
operator bool |
converte l'oggetto in bool, restituisce value Original: converts the object to bool, returns value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) |
Member types
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 |
value_type
|
bool
|
type
|
std::integral_constant<bool, value> |
[modifica] Esempio
// myalloc is a stateful Allocator with a single-argument constructor // that takes an int. It has no default constructor. typedef std::vector<int, myalloc<int>> innervector_t; typedef std::tuple<int, innervector_t> elem_t; typedef std::scoped_allocator_adaptor< myalloc<elem_t>, myalloc<int>> Alloc; Alloc a(1,2); std::vector<elem_t, Alloc> v(a); v.resize(1); // uses allocator #1 for elements of v std::get<1>(v[0]).resize(10); // uses allocator #2 for innervector_t
[modifica] Vedi anche
(C++11) |
controlla se il tipo specificato supporta usi-allocatore di costruzione Original: checks if the specified type supports uses-allocator construction The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe template) |