.TH "__gnu_cxx::__alloc_traits< _Alloc >" 3cxx "Wed Apr 11 2018" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME __gnu_cxx::__alloc_traits< _Alloc > .SH SYNOPSIS .br .PP .PP Inherits \fBstd::allocator_traits< _Alloc >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef \fBstd::allocator_traits\fP< _Alloc > \fB_Base_type\fP" .br .ti -1c .RI "typedef _Alloc \fBallocator_type\fP" .br .ti -1c .RI "typedef \fB_Base_type::const_pointer\fP \fBconst_pointer\fP" .br .ti -1c .RI "typedef const \fBvalue_type\fP & \fBconst_reference\fP" .br .ti -1c .RI "typedef __const_void_pointer \fBconst_void_pointer\fP" .br .ti -1c .RI "typedef \fB_Base_type::difference_type\fP \fBdifference_type\fP" .br .ti -1c .RI "typedef \fB_Base_type::pointer\fP \fBpointer\fP" .br .ti -1c .RI "typedef __propagate_on_container_copy_assignment \fBpropagate_on_container_copy_assignment\fP" .br .ti -1c .RI "typedef __propagate_on_container_move_assignment \fBpropagate_on_container_move_assignment\fP" .br .ti -1c .RI "typedef __propagate_on_container_swap \fBpropagate_on_container_swap\fP" .br .ti -1c .RI "template using \fBrebind_alloc\fP = typename __alloctr_rebind< _Alloc, _Tp >::__type" .br .ti -1c .RI "template using \fBrebind_traits\fP = allocator_traits< rebind_alloc< _Tp > >" .br .ti -1c .RI "typedef \fBvalue_type\fP & \fBreference\fP" .br .ti -1c .RI "typedef \fB_Base_type::size_type\fP \fBsize_type\fP" .br .ti -1c .RI "typedef \fB_Base_type::value_type\fP \fBvalue_type\fP" .br .ti -1c .RI "typedef __void_pointer \fBvoid_pointer\fP" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static constexpr bool \fB_S_always_equal\fP ()" .br .ti -1c .RI "static constexpr bool \fB_S_nothrow_move\fP ()" .br .ti -1c .RI "static constexpr bool \fB_S_nothrow_swap\fP ()" .br .ti -1c .RI "static void \fB_S_on_swap\fP (_Alloc &__a, _Alloc &__b)" .br .ti -1c .RI "static constexpr bool \fB_S_propagate_on_copy_assign\fP ()" .br .ti -1c .RI "static constexpr bool \fB_S_propagate_on_move_assign\fP ()" .br .ti -1c .RI "static constexpr bool \fB_S_propagate_on_swap\fP ()" .br .ti -1c .RI "static _Alloc \fB_S_select_on_copy\fP (const _Alloc &__a)" .br .ti -1c .RI "static \fBpointer\fP \fBallocate\fP (_Alloc &__a, \fBsize_type\fP __n)" .br .ti -1c .RI "static \fBpointer\fP \fBallocate\fP (_Alloc &__a, \fBsize_type\fP __n, \fBconst_void_pointer\fP __hint)" .br .ti -1c .RI "template static std::enable_if< __is_custom_pointer< _Ptr >::value >::type \fBconstruct\fP (_Alloc &__a, _Ptr __p, _Args &&\&.\&.\&. __args)" .br .ti -1c .RI "template static auto \fBconstruct\fP (_Alloc &__a, _Tp *__p, _Args &&\&.\&.\&. __args) \-> decltype(_S_construct(__a, __p, \fBstd::forward\fP< _Args >(__args)\&.\&.\&.))" .br .ti -1c .RI "static void \fBdeallocate\fP (_Alloc &__a, \fBpointer\fP __p, \fBsize_type\fP __n)" .br .ti -1c .RI "template static std::enable_if< __is_custom_pointer< _Ptr >::value >::type \fBdestroy\fP (_Alloc &__a, _Ptr __p)" .br .ti -1c .RI "template static void \fBdestroy\fP (_Alloc &__a, _Tp *__p)" .br .ti -1c .RI "static \fBsize_type\fP \fBmax_size\fP (const _Alloc &__a) noexcept" .br .ti -1c .RI "static _Alloc \fBselect_on_container_copy_construction\fP (const _Alloc &__rhs)" .br .in -1c .SH "Detailed Description" .PP .SS "template .br struct __gnu_cxx::__alloc_traits< _Alloc >" Uniform interface to C++98 and C++0x allocators\&. .PP Definition at line 95 of file ext/alloc_traits\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template typedef __const_void_pointer \fBstd::allocator_traits\fP< _Alloc >::\fBconst_void_pointer\fP\fC [inherited]\fP" .PP The allocator's const void pointer type\&. \fCAlloc::const_void_pointer\fP if that type exists, otherwise \fC pointer_traits::rebind \fP .PP Definition at line 138 of file bits/alloc_traits\&.h\&. .SS "template typedef __propagate_on_container_copy_assignment \fBstd::allocator_traits\fP< _Alloc >::\fBpropagate_on_container_copy_assignment\fP\fC [inherited]\fP" .PP How the allocator is propagated on copy assignment\&. \fCAlloc::propagate_on_container_copy_assignment\fP if that type exists, otherwise \fCfalse_type\fP .PP Definition at line 172 of file bits/alloc_traits\&.h\&. .SS "template typedef __propagate_on_container_move_assignment \fBstd::allocator_traits\fP< _Alloc >::\fBpropagate_on_container_move_assignment\fP\fC [inherited]\fP" .PP How the allocator is propagated on move assignment\&. \fCAlloc::propagate_on_container_move_assignment\fP if that type exists, otherwise \fCfalse_type\fP .PP Definition at line 184 of file bits/alloc_traits\&.h\&. .SS "template typedef __propagate_on_container_swap \fBstd::allocator_traits\fP< _Alloc >::\fBpropagate_on_container_swap\fP\fC [inherited]\fP" .PP How the allocator is propagated on swap\&. \fCAlloc::propagate_on_container_swap\fP if that type exists, otherwise \fCfalse_type\fP .PP Definition at line 195 of file bits/alloc_traits\&.h\&. .SS "template typedef __void_pointer \fBstd::allocator_traits\fP< _Alloc >::\fBvoid_pointer\fP\fC [inherited]\fP" .PP The allocator's void pointer type\&. \fCAlloc::void_pointer\fP if that type exists, otherwise \fC pointer_traits::rebind \fP .PP Definition at line 127 of file bits/alloc_traits\&.h\&. .SH "Member Function Documentation" .PP .SS "template static \fBpointer\fP \fBstd::allocator_traits\fP< _Alloc >::allocate (_Alloc & __a, \fBsize_type\fP __n)\fC [inline]\fP, \fC [static]\fP, \fC [inherited]\fP" .PP Allocate memory\&. .PP \fBParameters:\fP .RS 4 \fI__a\fP An allocator\&. .br \fI__n\fP The number of objects to allocate space for\&. .RE .PP Calls \fCa\&.allocate(n)\fP .PP Definition at line 359 of file bits/alloc_traits\&.h\&. .PP Referenced by std::__allocate_guarded()\&. .SS "template static \fBpointer\fP \fBstd::allocator_traits\fP< _Alloc >::allocate (_Alloc & __a, \fBsize_type\fP __n, \fBconst_void_pointer\fP __hint)\fC [inline]\fP, \fC [static]\fP, \fC [inherited]\fP" .PP Allocate memory\&. .PP \fBParameters:\fP .RS 4 \fI__a\fP An allocator\&. .br \fI__n\fP The number of objects to allocate space for\&. .br \fI__hint\fP Aid to locality\&. .RE .PP \fBReturns:\fP .RS 4 Memory of suitable size and alignment for \fIn\fP objects of type \fCvalue_type\fP .RE .PP Returns \fC a\&.allocate(n, hint) \fP if that expression is well-formed, otherwise returns \fCa\&.allocate(n)\fP .PP Definition at line 374 of file bits/alloc_traits\&.h\&. .SS "template template static auto \fBstd::allocator_traits\fP< _Alloc >::construct (_Alloc & __a, _Tp * __p, _Args &&\&.\&.\&. __args) \-> decltype(_S_construct(__a, __p, \fBstd::forward\fP<_Args>(__args)\&.\&.\&.)) \fC [inline]\fP, \fC [static]\fP, \fC [inherited]\fP" .PP Construct an object of type \fI_Tp\fP\&. .PP \fBParameters:\fP .RS 4 \fI__a\fP An allocator\&. .br \fI__p\fP Pointer to memory of suitable size and alignment for Tp .br \fI__args\fP Constructor arguments\&. .RE .PP Calls \fC __a\&.construct(__p, std::forward(__args)\&.\&.\&.) \fP if that expression is well-formed, otherwise uses placement-new to construct an object of type \fI_Tp\fP at location \fI__p\fP from the arguments \fI__args\fP\&.\&.\&. .PP Definition at line 400 of file bits/alloc_traits\&.h\&. .SS "template static void \fBstd::allocator_traits\fP< _Alloc >::deallocate (_Alloc & __a, \fBpointer\fP __p, \fBsize_type\fP __n)\fC [inline]\fP, \fC [static]\fP, \fC [inherited]\fP" .PP Deallocate memory\&. .PP \fBParameters:\fP .RS 4 \fI__a\fP An allocator\&. .br \fI__p\fP Pointer to the memory to deallocate\&. .br \fI__n\fP The number of objects space was allocated for\&. .RE .PP Calls \fC a\&.deallocate(p, n) \fP .PP Definition at line 385 of file bits/alloc_traits\&.h\&. .PP Referenced by std::__allocated_ptr< _Alloc >::~__allocated_ptr()\&. .SS "template template static void \fBstd::allocator_traits\fP< _Alloc >::destroy (_Alloc & __a, _Tp * __p)\fC [inline]\fP, \fC [static]\fP, \fC [inherited]\fP" .PP Destroy an object of type \fI_Tp\fP\&. .PP \fBParameters:\fP .RS 4 \fI__a\fP An allocator\&. .br \fI__p\fP Pointer to the object to destroy .RE .PP Calls \fC__a\&.destroy(__p)\fP if that expression is well-formed, otherwise calls \fC__p->~_Tp()\fP .PP Definition at line 413 of file bits/alloc_traits\&.h\&. .SS "template static \fBsize_type\fP \fBstd::allocator_traits\fP< _Alloc >::max_size (const _Alloc & __a)\fC [inline]\fP, \fC [static]\fP, \fC [noexcept]\fP, \fC [inherited]\fP" .PP The maximum supported allocation size\&. .PP \fBParameters:\fP .RS 4 \fI__a\fP An allocator\&. .RE .PP \fBReturns:\fP .RS 4 \fC__a\&.max_size()\fP or \fCnumeric_limits::max()\fP .RE .PP Returns \fC__a\&.max_size()\fP if that expression is well-formed, otherwise returns \fCnumeric_limits::max()\fP .PP Definition at line 424 of file bits/alloc_traits\&.h\&. .SS "template static _Alloc \fBstd::allocator_traits\fP< _Alloc >::select_on_container_copy_construction (const _Alloc & __rhs)\fC [inline]\fP, \fC [static]\fP, \fC [inherited]\fP" .PP Obtain an allocator to use when copying a container\&. .PP \fBParameters:\fP .RS 4 \fI__rhs\fP An allocator\&. .RE .PP \fBReturns:\fP .RS 4 \fC__rhs\&.select_on_container_copy_construction()\fP or \fI__rhs\fP .RE .PP Returns \fC__rhs\&.select_on_container_copy_construction()\fP if that expression is well-formed, otherwise returns \fI__rhs\fP .PP Definition at line 436 of file bits/alloc_traits\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.