.TH "std::allocator_traits< _Alloc >" 3cxx "Sun Jan 6 2013" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::allocator_traits< _Alloc > \- .SH SYNOPSIS .br .PP .PP Inherited by \fB__gnu_cxx::__alloc_traits< _Alloc >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef _Alloc \fBallocator_type\fP" .br .ti -1c .RI "typedef __const_pointer \fBconst_pointer\fP" .br .ti -1c .RI "typedef __const_void_pointer \fBconst_void_pointer\fP" .br .ti -1c .RI "typedef __difference_type \fBdifference_type\fP" .br .ti -1c .RI "typedef __pointer \fBpointer\fP" .br .ti -1c .RI "typedef .br __propagate_on_container_copy_assignment \fBpropagate_on_container_copy_assignment\fP" .br .ti -1c .RI "typedef .br __propagate_on_container_move_assignment \fBpropagate_on_container_move_assignment\fP" .br .ti -1c .RI "typedef .br __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 = \fBallocator_traits\fP< rebind_alloc< _Tp >>" .br .ti -1c .RI "typedef __size_type \fBsize_type\fP" .br .ti -1c .RI "typedef _Alloc::value_type \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 \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 void \fBconstruct\fP (_Alloc &__a, _Tp *__p, _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 void \fBdestroy\fP (_Alloc &__a, _Tp *__p)" .br .ti -1c .RI "static \fBsize_type\fP \fBmax_size\fP (const _Alloc &__a)" .br .ti -1c .RI "static _Alloc \fBselect_on_container_copy_construction\fP (const _Alloc &__rhs)" .br .in -1c .SH "Detailed Description" .PP .SS "templatestruct std::allocator_traits< _Alloc >" Uniform interface to all allocator types\&. .PP Definition at line 84 of file bits/alloc_traits\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _Alloc \fBstd::allocator_traits\fP< _Alloc >::\fBallocator_type\fP" .PP The allocator type\&. .PP Definition at line 87 of file bits/alloc_traits\&.h\&. .SS "template typedef __const_pointer \fBstd::allocator_traits\fP< _Alloc >::\fBconst_pointer\fP" .PP The allocator's const pointer type\&. \fCAlloc::const_pointer\fP if that type exists, otherwise \fC pointer_traits::rebind \fP .PP Definition at line 117 of file bits/alloc_traits\&.h\&. .SS "template typedef __const_void_pointer \fBstd::allocator_traits\fP< _Alloc >::\fBconst_void_pointer\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 139 of file bits/alloc_traits\&.h\&. .SS "template typedef __difference_type \fBstd::allocator_traits\fP< _Alloc >::\fBdifference_type\fP" .PP The allocator's difference type\&. \fCAlloc::difference_type\fP if that type exists, otherwise \fC \fBpointer_traits::difference_type\fP \fP .PP Definition at line 150 of file bits/alloc_traits\&.h\&. .SS "template typedef __pointer \fBstd::allocator_traits\fP< _Alloc >::\fBpointer\fP" .PP The allocator's pointer type\&. \fCAlloc::pointer\fP if that type exists, otherwise \fCvalue_type*\fP .PP Definition at line 106 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" .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 173 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" .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 185 of file bits/alloc_traits\&.h\&. .SS "template typedef __propagate_on_container_swap \fBstd::allocator_traits\fP< _Alloc >::\fBpropagate_on_container_swap\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 196 of file bits/alloc_traits\&.h\&. .SS "template typedef __size_type \fBstd::allocator_traits\fP< _Alloc >::\fBsize_type\fP" .PP The allocator's size type\&. \fCAlloc::size_type\fP if that type exists, otherwise \fC make_unsigned::type \fP .PP Definition at line 161 of file bits/alloc_traits\&.h\&. .SS "template typedef _Alloc::value_type \fBstd::allocator_traits\fP< _Alloc >::\fBvalue_type\fP" .PP The allocated type\&. .PP Definition at line 89 of file bits/alloc_traits\&.h\&. .SS "template typedef __void_pointer \fBstd::allocator_traits\fP< _Alloc >::\fBvoid_pointer\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 128 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" .PP Allocate memory\&. \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 348 of file bits/alloc_traits\&.h\&. .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" .PP Allocate memory\&. \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 363 of file bits/alloc_traits\&.h\&. .SS "template template static void \fBstd::allocator_traits\fP< _Alloc >::construct (_Alloc &__a, _Tp *__p, _Args &&\&.\&.\&.__args)\fC [inline]\fP, \fC [static]\fP" .PP Construct an object of type \fI_Tp\fP\&. \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 389 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" .PP Deallocate memory\&. \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 374 of file bits/alloc_traits\&.h\&. .SS "template template static void \fBstd::allocator_traits\fP< _Alloc >::destroy (_Alloc &__a, _Tp *__p)\fC [inline]\fP, \fC [static]\fP" .PP Destroy an object of type \fI_Tp\fP\&. \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 401 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" .PP The maximum supported allocation size\&. \fBParameters:\fP .RS 4 \fI__a\fP An allocator\&. .RE .PP \fBReturns:\fP .RS 4 \fC__a\&.max_size()\fP or \fC\fBnumeric_limits::max()\fP\fP .RE .PP Returns \fC__a\&.max_size()\fP if that expression is well-formed, otherwise returns \fC\fBnumeric_limits::max()\fP\fP .PP Definition at line 412 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" .PP Obtain an allocator to use when copying a container\&. \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 424 of file bits/alloc_traits\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.