typename X::pointer
-4- Remarks: Default:
T*
typename X::const_pointer
-5- Mandates:
-6- Remarks: Default:X X::pointer
is convertible toX X::const_pointer
.pointer_traits<X X::pointer>::rebind<const T>
typename X::void_pointer typename Y::void_pointer
-7- Mandates:
-8- Remarks: Default:X X::pointer
is convertible toX X::void_pointer
.X X::void_pointer
andY Y::void_pointer
are the same type.pointer_traits<X X::pointer>::rebind<void>
typename X::const_void_pointer typename Y::const_void_pointer
-9- Mandates:
-10- Remarks: Default:X X::pointer
,X X::const_pointer
, andX X::void_pointer
are convertible toX X::const_void_pointer
.X X::const_void_pointer
andY Y::const_void_pointer
are the same type.pointer_traits<X X::pointer>::rebind<const void>
typename X::value_type
-11- Result: Identical to
T
.
typename X::size_type
-12- Result: An unsigned integer type that can represent the size of the largest object in the allocation model.
-13- Remarks: Default:make_unsigned_t<X X::difference_type>
typename X::difference_type
-14- Result: A signed integer type that can represent the difference between any two pointers in the allocation model.
-15- Remarks: Default:pointer_traits<X X::pointer>::difference_type
typename X::template rebind<U>::other
-16- Result:
-17- Postconditions: For allY
U
(includingT
),Y Y:: template rebind rebind_alloc<T> ::other
isX
. -18- Remarks: IfAllocator
is a class template instantiation of the formSomeAllocator<T, Args>
, whereArgs
is zero or more type arguments, andAllocator
does not supply arebind
member template, the standardallocator_traits
template usesSomeAllocator<U, Args>
in place ofAllocator::rebind<U>::other
by default. For allocator types that are not template instantiations of the above form, no default is provided. -19- [Note 1: The member class templaterebind
ofX
is effectively a typedef template. In general, if the nameAllocator
is bound toSomeAllocator<T>
, thenAllocator::rebind<U>::other
is the same type asSomeAllocator<U>
, whereSomeAllocator<T>::value_type
isT
andSomeAllocator<U>::value_type
isU
. — end note]
[…]
static_cast<XX::pointer>(w)
-29- Result:
-30- Postconditions:X X::pointer
static_cast<X X::pointer>(w) == p
.
static_cast<XX::const_pointer>(x)
-31- Result:
-32- Postconditions:X X::const_pointer
static_cast<X X::const_pointer>(x) == q
.
pointer_traits<XX::pointer>::pointer_to(r)
-33- Result:
-34- Postconditions: Same asX X::pointer
p
.
a.allocate(n)
-35- Result:
[…]X X::pointer
a.allocate(n, y)
-40- Result:
[…]X X::pointer
a.allocate_at_least(n)
[…]-43- Result:
-44- Returns:allocation_result<X X::pointer>
allocation_result<X X::pointer>{ptr, count}
whereptr
is memory allocated for an array of countT
and such an object is created but array elements are not constructed, such thatcount = n
. Ifn == 0
, the return value is unspecified. […]
a.max_size()
[…]-50- Result:
-51- Returns: The largest valueX X::size_type
n
that can meaningfully be passed toX:: a.allocate( n)
. -52- Remarks: Default:numeric_limits<size_type>::max() / sizeof(value_type)
a == b
[…]-59- Result:
-60- Returns:bool
a == Y Y::rebind _alloc<T> ::other(b)
.
-92- An allocator type X
shall meet the Cpp17CopyConstructible requirements (Table 33). The X X::pointer
, X X::const_pointer
, X X::void_pointer
, and X X::const_void_pointer
types shall meet the Cpp17NullablePointer requirements (Table 37). No constructor, comparison operator function, copy operation, move operation, or swap operation on these pointer types shall exit via an exception. X X::pointer
and X X::const_pointer
shall also meet the requirements for a Cpp17RandomAccessIterator (25.3.5.7) and the additional requirement that, when a p
and ( a p + n)
are dereferenceable pointer values for some integral value n
, addressof(*( a p + n)) == addressof(* a p) + n
is true
.
x1
and x2
denote objects of (possibly different) types X X::void_pointer
, X X::const_void_pointer
, X X::pointer
, or X X::const_pointer
. Then, x1
and x2
are equivalently-valued pointer values, if and only if both x1
and x2
can be explicitly converted to the two corresponding objects px1
and px2
of type X X::const_pointer
, using a sequence of static_cast
s using only these four types, and the expression px1 == px2
evaluates to true
. -94- Let w1
and w2
denote objects of type X X::void_pointer
. Then for the expressions
w1 == w2 w1 != w2
either or both objects may be replaced by an equivalently-valued object of type X X::const_void_pointer
with no change in semantics.
p1
and p2
denote objects of type X X::pointer
. Then for the expressions
p1 == p2 p1 != p2 p1 < p2 p1 <= p2 p1 >= p2 p1 > p2 p1 - p2
either or both objects may be replaced by an equivalently-valued object of type X X::const_pointer
with no change in semantics.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4