Espaços nominais
Variantes
Acções

std::uses_allocator

Da cppreference.com
< cpp‎ | memory

 
 
Biblioteca de utilitários
Digite apoio (basic types, RTTI, type traits)
Gerenciamento de memória dinâmica
De tratamento de erros
Utilidades do programa
Variadic funções
Data e hora
Objetos de função
(C++11)
Os operadores relacionais
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>=
Pares e tuplas
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.
(C++11)
Troque, avançar e avançar
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.
(C++11)
(C++11)
(C++11)
 
Gerenciamento de memória dinâmica
Gerenciamento de memória de baixo nível
Alocadores
Original:
Allocators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
uses_allocator
(C++11)
Uninitialized armazenamento
Original:
Uninitialized storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ponteiros inteligentes
Original:
Smart pointers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
(C++11)
(obsoleta)
(C++11)
Apoio a coleta de lixo
Original:
Garbage collection support
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Diversos
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
C Library
Original:
C Library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido no cabeçalho <memory>
template<class T, class Alloc >
struct uses_allocator
(desde C++11)
Se T tem um membro allocator_type typedef que é convertível de Alloc, fornece o membro constante igual a valuetrue. Caso contrário 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.

Índice

Herdado de std::integral_constant

Member constants

value
[estática]
true se T uses allocator Alloc, false contrário
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.

(membro estático público constante)

Member functions

operator bool
converte o objeto em bool, retorna 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.

(função pública membro)

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_typebool
typestd::integral_constant<bool, value>

[editar]Especializações

Especializações personalizados do traço tipo std::uses_allocator são permitidos para tipos que não têm o allocator_type membro typedef mas satisfazer um dos seguintes requisitos:
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 tem um construtor que leva std::allocator_arg_t como o primeiro argumento, e Alloc como segundo argumento.
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 tem um construtor que leva Alloc como último argumento.
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.
Os seguintes especializações já são fornecidas pela biblioteca padrão:
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.
especializa o traço 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.

(especialização modelo. classe)[edit]
especializa o traço 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.

(modelo de função)[edit]
especializa o traço 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.

(modelo de função)[edit]
especializa o traço 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.

(modelo de função)[edit]
especializa o traço 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.

(especialização modelo. classe)[edit]
especializa o traço 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.

(especialização modelo. classe)[edit]
especializa o traço 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.

(especialização modelo. classe)[edit]

[editar]Notas

Esta característica tipo é utilizado por std::scoped_allocator_adaptor e pode ser usado por allocators personalizados para determinar se o objecto a ser construído é-se capaz de usar um alocador (por exemplo, é um recipiente), caso em que um alocador devem ser passados ​​para o construtor.
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.

[editar]Veja também

um objeto de std::allocator_arg_t tipo usado para selecionar alocador de reconhecimento de construtores
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.

(constante)[edit]
tipo de etiqueta usada para selecionar sobrecargas alocador de reconhecimento do construtor
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)[edit]
implementa multi-nível alocador de multi-nível de contêineres
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.

(modelo de classe)[edit]
close