std::uses_allocator - cppreference.com
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. |
<metanoindex/>
<tbody> </tbody>
| Elemento definito nell'header <memory> |
||
|
|
(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.
Inherited from std::integral_constant
Member constants
Original:
The text has been machine-translated via Google Translate. (pubblico membro statico costante) | |
Member functions
converte l'oggetto in Original: converts the object to The text has been machine-translated via Google Translate. (metodo pubblico) | |
Member types
Tipo Original: Type The text has been machine-translated via Google Translate. |
Definition |
value_type
|
bool
|
type
|
std::integral_constant<bool, value>
|
Specializzazioni
Specializzazioni personalizzate del tipo di carattere std::uses_allocator sono consentiti per i tipi che non hanno il 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.
1)
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.
2)
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.
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.
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. (classe modello di specializzazione) [modifica] | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. (funzione di modello) [modifica] | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. (funzione di modello) [modifica] | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. (funzione di modello) [modifica] | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. (classe modello di specializzazione) [modifica] | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. (classe modello di specializzazione) [modifica] | |
specializzata il tratto tipo std::uses_allocator Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. (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.
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. (costante) [modifica] |
(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. (classe) [modifica] |
(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. (classe template) [modifica] |