Espaços nominais
Variantes
Acções

std::allocator

Da cppreference.com
< cpp‎ | memory

 
 
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.
allocator
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.
 
std::allocator
Funções de membro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
allocator::allocator
allocator::~allocator
allocator::address
allocator::allocate
allocator::deallocate
allocator::max_size
allocator::construct
allocator::destroy
Não-membros funções
Original:
Non-member functions
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 >
struct allocator;
(1)
template<>
struct allocator<void>;
(2)
O modelo de classe std::allocator é o Allocator padrão usado por todos os recipientes de biblioteca padrão se nenhum alocador especificado pelo usuário é fornecida. O alocador padrão é apátrida, ou seja, todas as instâncias do alocador de dado são intercambiáveis, comparar igual e pode liberar a memória alocada por qualquer outra instância do tipo alocador mesmo.
Original:
The std::allocator class template is the default Allocator used by all standard library containers if no user-specified allocator is provided. The default allocator is stateless, that is, all instances of the given allocator are interchangeable, compare equal and can deallocate memory allocated by any other instance of the same allocator type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Especialização para void não tem os membros typedefs reference, const_reference, size_type e difference_type. Esta especialização não declara as funções de membro.
Original:
Specialization for void lacks the member typedefs reference, const_reference, size_type and difference_type. This specialization declares no member functions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
All custom allocators also must be stateless. (até C++11)
Custom allocators may contain state. Each container or another allocator-aware object stores an instance of the supplied allocator and controls allocator replacement through std::allocator_traits. (desde C++11)

Índice

[editar]Tipos de membro

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_typeT
pointerT*
const_pointerconst T*
referenceT&
const_referenceconst T&
size_typestd::size_t
difference_typestd::ptrdiff_t
rebindtemplate<class U >struct rebind {typedef allocator<U> other;};

[editar]Funções de membro

cria uma instância de alocador de novo
Original:
creates a new allocator instance
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)[edit]
destrói uma instância alocador
Original:
destructs an allocator instance
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)[edit]
obtém o endereço de um objeto, mesmo se operator& está sobrecarregado
Original:
obtains the address of an object, even if operator& is overloaded
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)[edit]
aloca inicializado armazenamento
Original:
allocates uninitialized storage
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)[edit]
desaloca armazenamento
Original:
deallocates storage
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)[edit]
retorna o tamanho maior alocação suportado
Original:
returns the largest supported allocation size
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)[edit]
constrói um objeto no armazenamento alocado
Original:
constructs an object in allocated storage
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)[edit]
destrói um objeto no armazenamento alocado
Original:
destructs an object in allocated storage
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)[edit]

[editar]Não-membros funções

compara duas instâncias alocador
Original:
compares two allocator instances
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)[edit]

[editar]Veja também

fornece informações sobre os tipos de alocador
Original:
provides information about allocator types
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]
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]
verifica se o tipo especificado suporta usos alocador-construção
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.

(modelo de classe)[edit]
close