|
9041 | 9041 | \end{itemdescr}
|
9042 | 9042 |
|
9043 | 9043 | \indextext{smart pointers|(}%
|
9044 |
| -\rSec2[util.smartptr]{Shared-ownership pointers} |
9045 |
| - |
9046 |
| -\rSec3[util.smartptr.weak.bad]{Class \tcode{bad_weak_ptr}} |
| 9044 | +\rSec2[util.smartptr.weak.bad]{Class \tcode{bad_weak_ptr}} |
9047 | 9045 | \indexlibrary{\idxcode{bad_weak_ptr}}%
|
9048 | 9046 | \begin{codeblock}
|
9049 | 9047 | namespace std {
|
|
9070 | 9068 |
|
9071 | 9069 | \end{itemdescr}
|
9072 | 9070 |
|
9073 |
| -\rSec3[util.smartptr.shared]{Class template \tcode{shared_ptr}} |
| 9071 | +\rSec2[util.smartptr.shared]{Class template \tcode{shared_ptr}} |
9074 | 9072 |
|
9075 | 9073 | \pnum
|
9076 | 9074 | \indexlibrary{\idxcode{shared_ptr}}%
|
|
9180 | 9178 | reflect modifications that can introduce data races.
|
9181 | 9179 |
|
9182 | 9180 | \pnum
|
9183 |
| -For the purposes of subclause \ref{util.smartptr}, |
| 9181 | +For the purposes of subclause \ref{smartptr}, |
9184 | 9182 | a pointer type \tcode{Y*} is said to be
|
9185 | 9183 | \defnx{compatible with}{compatible with!\idxcode{shared_ptr}}
|
9186 | 9184 | a pointer type \tcode{T*} when either
|
9187 | 9185 | \tcode{Y*} is convertible to \tcode{T*} or
|
9188 | 9186 | \tcode{Y} is \tcode{U[N]} and \tcode{T} is \cv{}~\tcode{U[]}.
|
9189 | 9187 |
|
9190 |
| -\rSec4[util.smartptr.shared.const]{\tcode{shared_ptr} constructors} |
| 9188 | +\rSec3[util.smartptr.shared.const]{\tcode{shared_ptr} constructors} |
9191 | 9189 |
|
9192 | 9190 | \pnum
|
9193 | 9191 | In the constructor definitions below,
|
|
9395 | 9393 | If an exception is thrown, the constructor has no effect.
|
9396 | 9394 | \end{itemdescr}
|
9397 | 9395 |
|
9398 |
| -\rSec4[util.smartptr.shared.dest]{\tcode{shared_ptr} destructor} |
| 9396 | +\rSec3[util.smartptr.shared.dest]{\tcode{shared_ptr} destructor} |
9399 | 9397 |
|
9400 | 9398 | \indexlibrary{\idxcode{shared_ptr}!destructor}%
|
9401 | 9399 | \begin{itemdecl}
|
|
9426 | 9424 | \tcode{*this} will report a \tcode{use_count()} that is one less
|
9427 | 9425 | than its previous value. \end{note}
|
9428 | 9426 |
|
9429 |
| -\rSec4[util.smartptr.shared.assign]{\tcode{shared_ptr} assignment} |
| 9427 | +\rSec3[util.smartptr.shared.assign]{\tcode{shared_ptr} assignment} |
9430 | 9428 |
|
9431 | 9429 | \indexlibrarymember{operator=}{shared_ptr}%
|
9432 | 9430 | \begin{itemdecl}
|
|
9481 | 9479 | \returns \tcode{*this}.
|
9482 | 9480 | \end{itemdescr}
|
9483 | 9481 |
|
9484 |
| - |
9485 |
| - |
9486 |
| -\rSec4[util.smartptr.shared.mod]{\tcode{shared_ptr} modifiers} |
| 9482 | +\rSec3[util.smartptr.shared.mod]{\tcode{shared_ptr} modifiers} |
9487 | 9483 |
|
9488 | 9484 | \indexlibrarymember{swap}{shared_ptr}%
|
9489 | 9485 | \begin{itemdecl}
|
|
9532 | 9528 | \effects Equivalent to \tcode{shared_ptr(p, d, a).swap(*this)}.
|
9533 | 9529 | \end{itemdescr}
|
9534 | 9530 |
|
9535 |
| -\rSec4[util.smartptr.shared.obs]{\tcode{shared_ptr} observers} |
| 9531 | +\rSec3[util.smartptr.shared.obs]{\tcode{shared_ptr} observers} |
9536 | 9532 | \indexlibrarymember{get}{shared_ptr}%
|
9537 | 9533 | \begin{itemdecl}
|
9538 | 9534 | element_type* get() const noexcept;
|
|
9651 | 9647 |
|
9652 | 9648 | \end{itemdescr}
|
9653 | 9649 |
|
9654 |
| - |
9655 |
| -\rSec4[util.smartptr.shared.create]{\tcode{shared_ptr} creation} |
| 9650 | +\rSec3[util.smartptr.shared.create]{\tcode{shared_ptr} creation} |
9656 | 9651 |
|
9657 | 9652 | \pnum
|
9658 | 9653 | The common requirements that apply to
|
|
9923 | 9918 | \end{example}
|
9924 | 9919 | \end{itemdescr}
|
9925 | 9920 |
|
9926 |
| -\rSec4[util.smartptr.shared.cmp]{\tcode{shared_ptr} comparison} |
| 9921 | +\rSec3[util.smartptr.shared.cmp]{\tcode{shared_ptr} comparison} |
9927 | 9922 |
|
9928 | 9923 | \indexlibrarymember{operator==}{shared_ptr}%
|
9929 | 9924 | \begin{itemdecl}
|
|
10045 | 10040 | The second function template returns \tcode{!(nullptr < a)}.
|
10046 | 10041 | \end{itemdescr}
|
10047 | 10042 |
|
10048 |
| -\rSec4[util.smartptr.shared.spec]{\tcode{shared_ptr} specialized algorithms} |
| 10043 | +\rSec3[util.smartptr.shared.spec]{\tcode{shared_ptr} specialized algorithms} |
10049 | 10044 |
|
10050 | 10045 | \indexlibrarymember{swap}{shared_ptr}%
|
10051 | 10046 | \begin{itemdecl}
|
|
10057 | 10052 | \pnum\effects Equivalent to \tcode{a.swap(b)}.
|
10058 | 10053 | \end{itemdescr}
|
10059 | 10054 |
|
10060 |
| -\rSec4[util.smartptr.shared.cast]{\tcode{shared_ptr} casts} |
| 10055 | +\rSec3[util.smartptr.shared.cast]{\tcode{shared_ptr} casts} |
10061 | 10056 |
|
10062 | 10057 | \indexlibrarymember{static_pointer_cast}{shared_ptr}%
|
10063 | 10058 | \begin{itemdecl}
|
|
10163 | 10158 | \end{note}
|
10164 | 10159 | \end{itemdescr}
|
10165 | 10160 |
|
10166 |
| -\rSec4[util.smartptr.getdeleter]{\tcode{get_deleter}} |
| 10161 | +\rSec3[util.smartptr.getdeleter]{\tcode{get_deleter}} |
10167 | 10162 |
|
10168 | 10163 | \indexlibrarymember{get_deleter}{shared_ptr}%
|
10169 | 10164 | \begin{itemdecl}
|
|
10182 | 10177 | \tcode{p} have been destroyed. \end{note}
|
10183 | 10178 | \end{itemdescr}
|
10184 | 10179 |
|
10185 |
| -\rSec4[util.smartptr.shared.io]{\tcode{shared_ptr} I/O} |
| 10180 | +\rSec3[util.smartptr.shared.io]{\tcode{shared_ptr} I/O} |
10186 | 10181 |
|
10187 | 10182 | \indexlibrarymember{operator<<}{shared_ptr}%
|
10188 | 10183 | \begin{itemdecl}
|
|
10196 | 10191 | \pnum\returns \tcode{os}.
|
10197 | 10192 | \end{itemdescr}
|
10198 | 10193 |
|
10199 |
| -\rSec3[util.smartptr.weak]{Class template \tcode{weak_ptr}} |
| 10194 | +\rSec2[util.smartptr.weak]{Class template \tcode{weak_ptr}} |
10200 | 10195 |
|
10201 | 10196 | \pnum
|
10202 | 10197 | \indexlibrary{\idxcode{weak_ptr}}%
|
|
10264 | 10259 | containers. The template parameter \tcode{T} of \tcode{weak_ptr} may be an
|
10265 | 10260 | incomplete type.
|
10266 | 10261 |
|
10267 |
| -\rSec4[util.smartptr.weak.const]{\tcode{weak_ptr} constructors} |
| 10262 | +\rSec3[util.smartptr.weak.const]{\tcode{weak_ptr} constructors} |
10268 | 10263 |
|
10269 | 10264 | \indexlibrary{\idxcode{weak_ptr}!constructor}%
|
10270 | 10265 | \begin{itemdecl}
|
|
10312 | 10307 | \tcode{r} shall be empty. \tcode{r.use_count() == 0}.
|
10313 | 10308 | \end{itemdescr}
|
10314 | 10309 |
|
10315 |
| -\rSec4[util.smartptr.weak.dest]{\tcode{weak_ptr} destructor} |
| 10310 | +\rSec3[util.smartptr.weak.dest]{\tcode{weak_ptr} destructor} |
10316 | 10311 |
|
10317 | 10312 | \indexlibrary{\idxcode{weak_ptr}!destructor}%
|
10318 | 10313 | \begin{itemdecl}
|
|
10324 | 10319 | effect on the object its stored pointer points to.
|
10325 | 10320 | \end{itemdescr}
|
10326 | 10321 |
|
10327 |
| -\rSec4[util.smartptr.weak.assign]{\tcode{weak_ptr} assignment} |
| 10322 | +\rSec3[util.smartptr.weak.assign]{\tcode{weak_ptr} assignment} |
10328 | 10323 |
|
10329 | 10324 | \indexlibrarymember{operator=}{weak_ptr}%
|
10330 | 10325 | \begin{itemdecl}
|
|
10354 | 10349 | \pnum\returns \tcode{*this}.
|
10355 | 10350 | \end{itemdescr}
|
10356 | 10351 |
|
10357 |
| -\rSec4[util.smartptr.weak.mod]{\tcode{weak_ptr} modifiers} |
| 10352 | +\rSec3[util.smartptr.weak.mod]{\tcode{weak_ptr} modifiers} |
10358 | 10353 | \indexlibrarymember{swap}{weak_ptr}%
|
10359 | 10354 | \begin{itemdecl}
|
10360 | 10355 | void swap(weak_ptr& r) noexcept;
|
|
10373 | 10368 | \pnum\effects Equivalent to \tcode{weak_ptr().swap(*this)}.
|
10374 | 10369 | \end{itemdescr}
|
10375 | 10370 |
|
10376 |
| -\rSec4[util.smartptr.weak.obs]{\tcode{weak_ptr} observers} |
| 10371 | +\rSec3[util.smartptr.weak.obs]{\tcode{weak_ptr} observers} |
10377 | 10372 | \indexlibrarymember{use_count}{weak_ptr}%
|
10378 | 10373 | \begin{itemdecl}
|
10379 | 10374 | long use_count() const noexcept;
|
|
10425 | 10420 | \end{itemdescr}
|
10426 | 10421 |
|
10427 | 10422 |
|
10428 |
| -\rSec4[util.smartptr.weak.spec]{\tcode{weak_ptr} specialized algorithms} |
| 10423 | +\rSec3[util.smartptr.weak.spec]{\tcode{weak_ptr} specialized algorithms} |
10429 | 10424 |
|
10430 | 10425 | \indexlibrarymember{swap}{weak_ptr}%
|
10431 | 10426 | \begin{itemdecl}
|
|
10437 | 10432 | \pnum\effects Equivalent to \tcode{a.swap(b)}.
|
10438 | 10433 | \end{itemdescr}
|
10439 | 10434 |
|
10440 |
| -\rSec3[util.smartptr.ownerless]{Class template \tcode{owner_less}} |
| 10435 | +\rSec2[util.smartptr.ownerless]{Class template \tcode{owner_less}} |
10441 | 10436 |
|
10442 | 10437 | \pnum
|
10443 | 10438 | The class template \tcode{owner_less} allows ownership-based mixed comparisons of shared
|
|
10488 | 10483 | both empty.
|
10489 | 10484 | \end{itemize} \end{note}
|
10490 | 10485 |
|
10491 |
| -\rSec3[util.smartptr.enab]{Class template \tcode{enable_shared_from_this}} |
| 10486 | +\rSec2[util.smartptr.enab]{Class template \tcode{enable_shared_from_this}} |
10492 | 10487 |
|
10493 | 10488 | \pnum
|
10494 | 10489 | \indexlibrary{\idxcode{enable_shared_from_this}}%
|
|
10578 | 10573 | \pnum\returns \tcode{weak_this}.
|
10579 | 10574 | \end{itemdescr}
|
10580 | 10575 |
|
10581 |
| -\rSec3[util.smartptr.hash]{Smart pointer hash support} |
| 10576 | +\rSec2[util.smartptr.hash]{Smart pointer hash support} |
10582 | 10577 |
|
10583 | 10578 | \indexlibrary{\idxcode{hash}!\idxcode{unique_ptr}}%
|
10584 | 10579 | \begin{itemdecl}
|
|
0 commit comments