std::uses_allocator
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 <memory>
|
||
template< class T, class Alloc > struct uses_allocator |
(dal C++11) | |
Se
T
ha un allocator_type
membro typedef che è convertibile da Alloc
, fornisce l'elemento costante value
pari a true. In caso contrario, è value
false.Original:
If
T
has a member typedef allocator_type
which is convertible from Alloc
, provides the member constant value
equal to true. Otherwise value
is false.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 se T uses allocator Alloc , false altrimenti Original: true if T uses allocator Alloc , false otherwise The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (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] Specializzazioni
Specializzazioni personalizzate del tipo di carattere std::uses_allocator sono consentiti per i tipi che non hanno il
1) allocator_type
membro typedef, ma che una delle seguenti due condizioni:Original:
Custom specializations of the type trait std::uses_allocator are allowed for types that do not have the member typedef
allocator_type
but satisfy one of the following two requirements: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.
T
ha un costruttore che prende std::allocator_arg_t come primo argomento, e Alloc
come secondo argomento.Original:
T
has a constructor which takes std::allocator_arg_t as the first argument, and Alloc
as the second argument.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.
T
ha un costruttore che prende Alloc
come ultimo argomento.Original:
T
has a constructor which takes Alloc
as the last argument.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.
Le specializzazioni sono già fornite dalla libreria standard:
Original:
The following specializations are already provided by the standard library:
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.
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe modello di specializzazione) | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione di modello) | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione di modello) | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione di modello) | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe modello di specializzazione) | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe modello di specializzazione) | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe modello di specializzazione) |
[modifica] Note
Questa caratteristica tipo viene utilizzato da std::scoped_allocator_adaptor e possono essere utilizzati da allocatore personalizzati per determinare se l'oggetto in costruzione è di per sé in grado di utilizzare un allocatore (ad esempio è un contenitore), nel qual caso un allocatore deve essere passato al costruttore.
Original:
This type trait is used by std::scoped_allocator_adaptor and may be used by custom allocators to determine whether the object being constructed is itself capable of using an allocator (e.g. is a container), in which case an allocator should be passed to its constructor.
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] Vedi anche
(C++11) |
un oggetto di std::allocator_arg_t tipo usato per selezionare allocatore-aware costruttori Original: an object of type std::allocator_arg_t used to select allocator-aware constructors The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (costante) |
(C++11) |
tipo di tag utilizzato per selezionare allocatore-aware overload del costruttore Original: tag type used to select allocator-aware constructor overloads The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe) |
(C++11) |
implementa multilivello allocatore per contenitori multi-livello Original: implements multi-level allocator for multi-level containers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe template) |