|
2047 | 2047 | \begin{itemdescr}
|
2048 | 2048 | \pnum
|
2049 | 2049 | \mandates
|
2050 |
| -\tcode{X::pointer} is convertible to \tcode{X::const_pointer}. |
| 2050 | +\tcode{XX::pointer} is convertible to \tcode{XX::const_pointer}. |
2051 | 2051 |
|
2052 | 2052 | \pnum
|
2053 | 2053 | \remarks
|
2054 |
| -Default: \tcode{pointer_traits<X::pointer>::rebind<const T>} |
| 2054 | +Default: \tcode{pointer_traits<XX::pointer>::rebind<const T>} |
2055 | 2055 | \end{itemdescr}
|
2056 | 2056 |
|
2057 | 2057 | \begin{itemdecl}
|
|
2062 | 2062 | \begin{itemdescr}
|
2063 | 2063 | \pnum
|
2064 | 2064 | \mandates
|
2065 |
| -\tcode{X::pointer} is convertible to \tcode{X::void_pointer}. |
2066 |
| -\tcode{X::void_pointer} and \tcode{Y::void_pointer} are the same type. |
| 2065 | +\tcode{XX::pointer} is convertible to \tcode{XX::void_pointer}. |
| 2066 | +\tcode{XX::void_pointer} and \tcode{YY::void_pointer} are the same type. |
2067 | 2067 |
|
2068 | 2068 | \pnum
|
2069 | 2069 | \remarks
|
2070 | 2070 | Default:
|
2071 |
| -\tcode{pointer_traits<X::pointer>::rebind<void>} |
| 2071 | +\tcode{pointer_traits<XX::pointer>::rebind<void>} |
2072 | 2072 | \end{itemdescr}
|
2073 | 2073 |
|
2074 | 2074 | \begin{itemdecl}
|
|
2079 | 2079 | \begin{itemdescr}
|
2080 | 2080 | \pnum
|
2081 | 2081 | \mandates
|
2082 |
| -\tcode{X::pointer}, \tcode{X::const_pointer}, and \tcode{X::void_pointer} |
2083 |
| -are convertible to \tcode{X::const_void_pointer}. |
2084 |
| -\tcode{X::const_void_pointer} and \tcode{Y::const_void_pointer} |
| 2082 | +\tcode{XX::pointer}, \tcode{XX::const_pointer}, and \tcode{XX::void_pointer} |
| 2083 | +are convertible to \tcode{XX::const_void_pointer}. |
| 2084 | +\tcode{XX::const_void_pointer} and \tcode{YY::const_void_pointer} |
2085 | 2085 | are the same type.
|
2086 | 2086 |
|
2087 | 2087 | \pnum
|
2088 | 2088 | \remarks
|
2089 | 2089 | Default:
|
2090 |
| -\tcode{pointer_traits<X::pointer>::rebind<const void>} |
| 2090 | +\tcode{pointer_traits<XX::pointer>::rebind<const void>} |
2091 | 2091 | \end{itemdescr}
|
2092 | 2092 |
|
2093 | 2093 | \begin{itemdecl}
|
|
2113 | 2113 | \pnum
|
2114 | 2114 | \remarks
|
2115 | 2115 | Default:
|
2116 |
| -\tcode{make_unsigned_t<X::difference_type>} |
| 2116 | +\tcode{make_unsigned_t<XX::difference_type>} |
2117 | 2117 | \end{itemdescr}
|
2118 | 2118 |
|
2119 | 2119 | \begin{itemdecl}
|
|
2129 | 2129 | \pnum
|
2130 | 2130 | \remarks
|
2131 | 2131 | Default:
|
2132 |
| -\tcode{pointer_traits<X::pointer>::difference_type} |
| 2132 | +\tcode{pointer_traits<XX::pointer>::difference_type} |
2133 | 2133 | \end{itemdescr}
|
2134 | 2134 |
|
2135 | 2135 | \begin{itemdecl}
|
|
2144 | 2144 | \pnum
|
2145 | 2145 | \ensures
|
2146 | 2146 | For all \tcode{U} (including \tcode{T}),
|
2147 |
| -\tcode{Y::template rebind<T>::other} is \tcode{X}. |
| 2147 | +\tcode{YY::rebind_alloc<T>} is \tcode{X}. |
2148 | 2148 |
|
2149 | 2149 | \pnum
|
2150 | 2150 | \remarks
|
|
2230 | 2230 | \end{itemdescr}
|
2231 | 2231 |
|
2232 | 2232 | \begin{itemdecl}
|
2233 |
| -static_cast<X::pointer>(w) |
| 2233 | +static_cast<XX::pointer>(w) |
2234 | 2234 | \end{itemdecl}
|
2235 | 2235 |
|
2236 | 2236 | \begin{itemdescr}
|
2237 | 2237 | \pnum
|
2238 | 2238 | \result
|
2239 |
| -\tcode{X::pointer} |
| 2239 | +\tcode{XX::pointer} |
2240 | 2240 |
|
2241 | 2241 | \pnum
|
2242 | 2242 | \ensures
|
2243 |
| -\tcode{static_cast<X::pointer>(w) == p}. |
| 2243 | +\tcode{static_cast<XX::pointer>(w) == p}. |
2244 | 2244 | \end{itemdescr}
|
2245 | 2245 |
|
2246 | 2246 | \begin{itemdecl}
|
2247 |
| -static_cast<X::const_pointer>(x) |
| 2247 | +static_cast<XX::const_pointer>(x) |
2248 | 2248 | \end{itemdecl}
|
2249 | 2249 |
|
2250 | 2250 | \begin{itemdescr}
|
2251 | 2251 | \pnum
|
2252 | 2252 | \result
|
2253 |
| -\tcode{X::const_pointer} |
| 2253 | +\tcode{XX::const_pointer} |
2254 | 2254 |
|
2255 | 2255 | \pnum
|
2256 | 2256 | \ensures
|
2257 |
| -\tcode{static_cast<X::const_pointer>(x) == q}. |
| 2257 | +\tcode{static_cast<XX::const_pointer>(x) == q}. |
2258 | 2258 | \end{itemdescr}
|
2259 | 2259 |
|
2260 | 2260 | \begin{itemdecl}
|
2261 |
| -pointer_traits<X::pointer>::pointer_to(r) |
| 2261 | +pointer_traits<XX::pointer>::pointer_to(r) |
2262 | 2262 | \end{itemdecl}
|
2263 | 2263 |
|
2264 | 2264 | \begin{itemdescr}
|
2265 | 2265 | \pnum
|
2266 | 2266 | \result
|
2267 |
| -\tcode{X::pointer} |
| 2267 | +\tcode{XX::pointer} |
2268 | 2268 |
|
2269 | 2269 | \pnum
|
2270 | 2270 | \ensures
|
|
2278 | 2278 | \begin{itemdescr}
|
2279 | 2279 | \pnum
|
2280 | 2280 | \result
|
2281 |
| -\tcode{X::pointer} |
| 2281 | +\tcode{XX::pointer} |
2282 | 2282 |
|
2283 | 2283 | \pnum
|
2284 | 2284 | \effects
|
|
2316 | 2316 | \begin{itemdescr}
|
2317 | 2317 | \pnum
|
2318 | 2318 | \result
|
2319 |
| -\tcode{X::pointer} |
| 2319 | +\tcode{XX::pointer} |
2320 | 2320 |
|
2321 | 2321 | \pnum
|
2322 | 2322 | \effects
|
|
2335 | 2335 | \begin{itemdescr}
|
2336 | 2336 | \pnum
|
2337 | 2337 | \result
|
2338 |
| -\tcode{allocation_result<X::pointer>} |
| 2338 | +\tcode{allocation_result<XX::pointer>} |
2339 | 2339 |
|
2340 | 2340 | \pnum
|
2341 | 2341 | \returns
|
2342 |
| -\tcode{allocation_result<X::pointer>\{ptr, count\}} |
| 2342 | +\tcode{allocation_result<XX::pointer>\{ptr, count\}} |
2343 | 2343 | where \tcode{ptr} is memory allocated for an array of \tcode{count} \tcode{T}
|
2344 | 2344 | and such an object is created but array elements are not constructed,
|
2345 | 2345 | such that $\tcode{count} \geq \tcode{n}$.
|
|
2397 | 2397 | \begin{itemdescr}
|
2398 | 2398 | \pnum
|
2399 | 2399 | \result
|
2400 |
| -\tcode{X::size_type} |
| 2400 | +\tcode{XX::size_type} |
2401 | 2401 |
|
2402 | 2402 | \pnum
|
2403 | 2403 | \returns
|
2404 |
| -The largest value that can meaningfully be passed to \tcode{X::allocate()}. |
| 2404 | +The largest value \tcode{n} that can meaningfully be passed to \tcode{a.allocate(n)}. |
2405 | 2405 |
|
2406 | 2406 | \pnum
|
2407 | 2407 | \remarks
|
|
2458 | 2458 |
|
2459 | 2459 | \pnum
|
2460 | 2460 | \returns
|
2461 |
| -\tcode{a == Y::rebind<T>::other(b)}. |
| 2461 | +\tcode{a == YY::rebind_alloc<T>(b)}. |
2462 | 2462 | \end{itemdescr}
|
2463 | 2463 |
|
2464 | 2464 | \begin{itemdecl}
|
|
2677 | 2677 | \pnum
|
2678 | 2678 | An allocator type \tcode{X} shall meet the
|
2679 | 2679 | \oldconcept{CopyConstructible} requirements (\tref{cpp17.copyconstructible}).
|
2680 |
| -The \tcode{X::pointer}, \tcode{X::const_pointer}, \tcode{X::void_pointer}, and |
2681 |
| -\tcode{X::const_void_pointer} types shall meet the |
| 2680 | +The \tcode{XX::pointer}, \tcode{XX::const_pointer}, \tcode{XX::void_pointer}, and |
| 2681 | +\tcode{XX::const_void_pointer} types shall meet the |
2682 | 2682 | \oldconcept{Nullable\-Pointer} requirements (\tref{cpp17.nullablepointer}).
|
2683 | 2683 | No constructor,
|
2684 | 2684 | comparison operator function, copy operation, move operation, or swap operation on
|
2685 |
| -these pointer types shall exit via an exception. \tcode{X::pointer} and \tcode{X::const_pointer} shall also |
| 2685 | +these pointer types shall exit via an exception. \tcode{XX::pointer} and \tcode{XX::const_pointer} shall also |
2686 | 2686 | meet the requirements for
|
2687 | 2687 | a \oldconcept{RandomAccessIterator}\iref{random.access.iterators} and
|
2688 |
| -the additional requirement that, when \tcode{a} and \tcode{(a + n)} are |
| 2688 | +the additional requirement that, when \tcode{p} and \tcode{(p + n)} are |
2689 | 2689 | dereferenceable pointer values for some integral value \tcode{n},
|
2690 | 2690 | \begin{codeblock}
|
2691 |
| -addressof(*(a + n)) == addressof(*a) + n |
| 2691 | +addressof(*(p + n)) == addressof(*p) + n |
2692 | 2692 | \end{codeblock}
|
2693 | 2693 | is \tcode{true}.
|
2694 | 2694 |
|
2695 | 2695 | \pnum
|
2696 | 2696 | Let \tcode{x1} and \tcode{x2} denote objects of (possibly different) types
|
2697 |
| -\tcode{X::void_pointer}, \tcode{X::const_void_pointer}, \tcode{X::pointer}, |
2698 |
| -or \tcode{X::const_pointer}. Then, \tcode{x1} and \tcode{x2} are |
| 2697 | +\tcode{XX::void_pointer}, \tcode{XX::const_void_pointer}, \tcode{XX::pointer}, |
| 2698 | +or \tcode{XX::const_pointer}. Then, \tcode{x1} and \tcode{x2} are |
2699 | 2699 | \defn{equivalently-valued} pointer values, if and only if both \tcode{x1} and \tcode{x2}
|
2700 | 2700 | can be explicitly converted to the two corresponding objects \tcode{px1} and \tcode{px2}
|
2701 |
| -of type \tcode{X::const_pointer}, using a sequence of \keyword{static_cast}s |
| 2701 | +of type \tcode{XX::const_pointer}, using a sequence of \keyword{static_cast}s |
2702 | 2702 | using only these four types, and the expression \tcode{px1 == px2}
|
2703 | 2703 | evaluates to \tcode{true}.
|
2704 | 2704 |
|
2705 | 2705 | \pnum
|
2706 |
| -Let \tcode{w1} and \tcode{w2} denote objects of type \tcode{X::void_pointer}. |
| 2706 | +Let \tcode{w1} and \tcode{w2} denote objects of type \tcode{XX::void_pointer}. |
2707 | 2707 | Then for the expressions
|
2708 | 2708 | \begin{codeblock}
|
2709 | 2709 | w1 == w2
|
2710 | 2710 | w1 != w2
|
2711 | 2711 | \end{codeblock}
|
2712 | 2712 | either or both objects may be replaced by an equivalently-valued object of type
|
2713 |
| -\tcode{X::const_void_pointer} with no change in semantics. |
| 2713 | +\tcode{XX::const_void_pointer} with no change in semantics. |
2714 | 2714 |
|
2715 | 2715 | \pnum
|
2716 |
| -Let \tcode{p1} and \tcode{p2} denote objects of type \tcode{X::pointer}. |
| 2716 | +Let \tcode{p1} and \tcode{p2} denote objects of type \tcode{XX::pointer}. |
2717 | 2717 | Then for the expressions
|
2718 | 2718 | \begin{codeblock}
|
2719 | 2719 | p1 == p2
|
|
2725 | 2725 | p1 - p2
|
2726 | 2726 | \end{codeblock}
|
2727 | 2727 | either or both objects may be replaced by an equivalently-valued object of type
|
2728 |
| -\tcode{X::const_pointer} with no change in semantics. |
| 2728 | +\tcode{XX::const_pointer} with no change in semantics. |
2729 | 2729 |
|
2730 | 2730 | \pnum
|
2731 | 2731 | An allocator may constrain the types on which it can be instantiated and the
|
|
0 commit comments