Пространства имён
Варианты
Действия

std::allocator_traits

Материал из cppreference.com

 
 
Динамическое управление памятью
Низкий уровень управления памятью
Распределители
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
allocator_traits(C++11)
allocator_arg_t(C++11)
allocator_arg(C++11)
uses_allocator(C++11)
scoped_allocator_adaptor(C++11)
Неинициализированные хранения
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.
uninitialized_copy
uninitialized_copy_n(C++11)
uninitialized_fill
uninitialized_fill_n
raw_storage_iterator
get_temporary_buffer
return_temporary_buffer
Умные указатели
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.
unique_ptr(C++11)
shared_ptr(C++11)
weak_ptr(C++11)
auto_ptr(устарело)
owner_less(C++11)
enable_shared_from_this(C++11)
bad_weak_ptr(C++11)
default_delete(C++11)
Поддержка сборки мусора
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.
declare_reachable(C++11)
undeclare_reachable(C++11)
declare_no_pointers(C++11)
undeclare_no_pointers(C++11)
pointer_safety(C++11)
get_pointer_safety(C++11)
Разное
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pointer_traits(C++11)
addressof(C++11)
align(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_traits
Член функций
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_traits::allocate
allocator_traits::deallocate
allocator_traits::construct
allocator_traits::destroy
allocator_traits::max_size
allocator_traits::select_on_container_copy_construction
 
Заголовочный файл <memory>
template< class Alloc >
struct allocator_traits;
(начиная с C++11)
Шаблон allocator_traits класс предоставляет стандартный способ доступа к различным свойствам распределителей. Стандартные контейнеры и другие стандартные распределители библиотеки компонентов доступа через этот шаблон, который позволяет использовать любой тип класса, как распределитель, пока предоставленные пользователем специализации allocator_traits реализует все необходимые функции.
Original:
The allocator_traits class template provides the standardized way to access various properties of allocators. The standard containers and other standard library components access allocators through this template, which makes it possible to use any class type as an allocator, as long as the user-provided specialization of allocator_traits implements all required functionality.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
По умолчанию, неспециализированной, allocator_traits содержит следующие элементы:
Original:
The default, non-specialized, allocator_traits contains the following members:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Содержание

[править] Член типов

Type
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
allocator_type Alloc
value_type Alloc::value_type
pointer
Alloc::pointer если он присутствует, иначе value_type*
Original:
Alloc::pointer if present, otherwise value_type*
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
const_pointer
Alloc::const_pointer если он присутствует, иначе std::pointer_traits<pointer>::rebind<const value_type>
Original:
Alloc::const_pointer if present, otherwise std::pointer_traits<pointer>::rebind<const value_type>
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
void_pointer
Alloc::void_pointer если он присутствует, иначе std::pointer_traits<pointer>::rebind<void>
Original:
Alloc::void_pointer if present, otherwise std::pointer_traits<pointer>::rebind<void>
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
const_void_pointer
Alloc::const_void_pointer если он присутствует, иначе std::pointer_traits<pointer>::rebind<const void>
Original:
Alloc::const_void_pointer if present, otherwise std::pointer_traits<pointer>::rebind<const void>
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
difference_type
Alloc::difference_type если он присутствует, иначе std::pointer_traits<pointer>::difference_type
Original:
Alloc::difference_type if present, otherwise std::pointer_traits<pointer>::difference_type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
size_type
Alloc::size_type если он присутствует, иначе std::make_unsigned<difference_type>::type
Original:
Alloc::size_type if present, otherwise std::make_unsigned<difference_type>::type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
propagate_on_container_copy_assignment
Alloc::propagate_on_container_copy_assignment если он присутствует, иначе std::false_type
Original:
Alloc::propagate_on_container_copy_assignment if present, otherwise std::false_type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
propagate_on_container_move_assignment
Alloc::propagate_on_container_move_assignment если он присутствует, иначе std::false_type
Original:
Alloc::propagate_on_container_move_assignment if present, otherwise std::false_type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
propagate_on_container_swap
Alloc::propagate_on_container_swap если он присутствует, иначе std::false_type
Original:
Alloc::propagate_on_container_swap if present, otherwise std::false_type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[править] Член псевдоним шаблонов

Type
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
rebind_alloc<T>
Alloc::rebind<T>::other если он присутствует, иначе Alloc<T, Args> если это Alloc является Alloc<U, Args>
Original:
Alloc::rebind<T>::other if present, otherwise Alloc<T, Args> if this Alloc is Alloc<U, Args>
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rebind_traits<T> std::allocator_traits<rebind_alloc<T>>

[править] Член функций

[static]
выделяет неинициализированные хранения с помощью распределителя
Original:
allocates uninitialized storage using the allocator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public static функция-член) [edit]
[static]
освобождает хранения с помощью распределителя
Original:
deallocates storage using the allocator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public static функция-член) [edit]
[static]
создает объект в выделенной памяти
Original:
constructs an object in the allocated storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(шаблон функции) [edit]
[static]
разрушает объект, хранящийся в выделенной памяти
Original:
destructs an object stored in the allocated storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(шаблон функции) [edit]
[static]
возвращает максимальный размер объекта поддерживается распределителя
Original:
returns the maximum object size supported by the allocator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public static функция-член) [edit]
получает распределитель использовать после копирования стандартных контейнеров
Original:
obtains the allocator to use after copying a standard container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public static функция-член) [edit]

[править] См. также

the default allocator
(шаблон класса) [edit]
реализует многоуровневую распределитель для многоуровневых контейнеров
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.

(шаблон класса) [edit]
предоставляет информацию об указателях, как типы
Original:
provides information about pointer-like types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(шаблон класса) [edit]