|
9045 | 9045 | \end{itemdescr}
|
9046 | 9046 |
|
9047 | 9047 | \indextext{smart pointers|(}%
|
9048 |
| -\rSec2[util.smartptr]{Shared-ownership pointers} |
9049 |
| - |
9050 |
| -\rSec3[util.smartptr.weak.bad]{Class \tcode{bad_weak_ptr}} |
| 9048 | +\rSec2[util.smartptr.weak.bad]{Class \tcode{bad_weak_ptr}} |
9051 | 9049 | \indexlibrary{\idxcode{bad_weak_ptr}}%
|
9052 | 9050 | \begin{codeblock}
|
9053 | 9051 | namespace std {
|
|
9074 | 9072 |
|
9075 | 9073 | \end{itemdescr}
|
9076 | 9074 |
|
9077 |
| -\rSec3[util.smartptr.shared]{Class template \tcode{shared_ptr}} |
| 9075 | +\rSec2[util.smartptr.shared]{Class template \tcode{shared_ptr}} |
9078 | 9076 |
|
9079 | 9077 | \pnum
|
9080 | 9078 | \indexlibrary{\idxcode{shared_ptr}}%
|
|
9184 | 9182 | reflect modifications that can introduce data races.
|
9185 | 9183 |
|
9186 | 9184 | \pnum
|
9187 |
| -For the purposes of subclause \ref{util.smartptr}, |
| 9185 | +For the purposes of subclause \ref{smartptr}, |
9188 | 9186 | a pointer type \tcode{Y*} is said to be
|
9189 | 9187 | \defnx{compatible with}{compatible with!\idxcode{shared_ptr}}
|
9190 | 9188 | a pointer type \tcode{T*} when either
|
9191 | 9189 | \tcode{Y*} is convertible to \tcode{T*} or
|
9192 | 9190 | \tcode{Y} is \tcode{U[N]} and \tcode{T} is \cv{}~\tcode{U[]}.
|
9193 | 9191 |
|
9194 |
| -\rSec4[util.smartptr.shared.const]{\tcode{shared_ptr} constructors} |
| 9192 | +\rSec3[util.smartptr.shared.const]{\tcode{shared_ptr} constructors} |
9195 | 9193 |
|
9196 | 9194 | \pnum
|
9197 | 9195 | In the constructor definitions below,
|
|
9399 | 9397 | If an exception is thrown, the constructor has no effect.
|
9400 | 9398 | \end{itemdescr}
|
9401 | 9399 |
|
9402 |
| -\rSec4[util.smartptr.shared.dest]{\tcode{shared_ptr} destructor} |
| 9400 | +\rSec3[util.smartptr.shared.dest]{\tcode{shared_ptr} destructor} |
9403 | 9401 |
|
9404 | 9402 | \indexlibrary{\idxcode{shared_ptr}!destructor}%
|
9405 | 9403 | \begin{itemdecl}
|
|
9430 | 9428 | \tcode{*this} will report a \tcode{use_count()} that is one less
|
9431 | 9429 | than its previous value. \end{note}
|
9432 | 9430 |
|
9433 |
| -\rSec4[util.smartptr.shared.assign]{\tcode{shared_ptr} assignment} |
| 9431 | +\rSec3[util.smartptr.shared.assign]{\tcode{shared_ptr} assignment} |
9434 | 9432 |
|
9435 | 9433 | \indexlibrarymember{operator=}{shared_ptr}%
|
9436 | 9434 | \begin{itemdecl}
|
|
9487 | 9485 |
|
9488 | 9486 |
|
9489 | 9487 |
|
9490 |
| -\rSec4[util.smartptr.shared.mod]{\tcode{shared_ptr} modifiers} |
| 9488 | +\rSec3[util.smartptr.shared.mod]{\tcode{shared_ptr} modifiers} |
9491 | 9489 |
|
9492 | 9490 | \indexlibrarymember{swap}{shared_ptr}%
|
9493 | 9491 | \begin{itemdecl}
|
|
9536 | 9534 | \effects Equivalent to \tcode{shared_ptr(p, d, a).swap(*this)}.
|
9537 | 9535 | \end{itemdescr}
|
9538 | 9536 |
|
9539 |
| -\rSec4[util.smartptr.shared.obs]{\tcode{shared_ptr} observers} |
| 9537 | +\rSec3[util.smartptr.shared.obs]{\tcode{shared_ptr} observers} |
9540 | 9538 | \indexlibrarymember{get}{shared_ptr}%
|
9541 | 9539 | \begin{itemdecl}
|
9542 | 9540 | element_type* get() const noexcept;
|
|
9656 | 9654 | \end{itemdescr}
|
9657 | 9655 |
|
9658 | 9656 |
|
9659 |
| -\rSec4[util.smartptr.shared.create]{\tcode{shared_ptr} creation} |
| 9657 | +\rSec3[util.smartptr.shared.create]{\tcode{shared_ptr} creation} |
9660 | 9658 |
|
9661 | 9659 | \pnum
|
9662 | 9660 | The common requirements that apply to
|
|
9927 | 9925 | \end{example}
|
9928 | 9926 | \end{itemdescr}
|
9929 | 9927 |
|
9930 |
| -\rSec4[util.smartptr.shared.cmp]{\tcode{shared_ptr} comparison} |
| 9928 | +\rSec3[util.smartptr.shared.cmp]{\tcode{shared_ptr} comparison} |
9931 | 9929 |
|
9932 | 9930 | \indexlibrarymember{operator==}{shared_ptr}%
|
9933 | 9931 | \begin{itemdecl}
|
|
10049 | 10047 | The second function template returns \tcode{!(nullptr < a)}.
|
10050 | 10048 | \end{itemdescr}
|
10051 | 10049 |
|
10052 |
| -\rSec4[util.smartptr.shared.spec]{\tcode{shared_ptr} specialized algorithms} |
| 10050 | +\rSec3[util.smartptr.shared.spec]{\tcode{shared_ptr} specialized algorithms} |
10053 | 10051 |
|
10054 | 10052 | \indexlibrarymember{swap}{shared_ptr}%
|
10055 | 10053 | \begin{itemdecl}
|
|
10061 | 10059 | \pnum\effects Equivalent to \tcode{a.swap(b)}.
|
10062 | 10060 | \end{itemdescr}
|
10063 | 10061 |
|
10064 |
| -\rSec4[util.smartptr.shared.cast]{\tcode{shared_ptr} casts} |
| 10062 | +\rSec3[util.smartptr.shared.cast]{\tcode{shared_ptr} casts} |
10065 | 10063 |
|
10066 | 10064 | \indexlibrarymember{static_pointer_cast}{shared_ptr}%
|
10067 | 10065 | \begin{itemdecl}
|
|
10165 | 10163 | \end{note}
|
10166 | 10164 | \end{itemdescr}
|
10167 | 10165 |
|
10168 |
| -\rSec4[util.smartptr.getdeleter]{\tcode{get_deleter}} |
| 10166 | +\rSec3[util.smartptr.getdeleter]{\tcode{get_deleter}} |
10169 | 10167 |
|
10170 | 10168 | \indexlibrarymember{get_deleter}{shared_ptr}%
|
10171 | 10169 | \begin{itemdecl}
|
|
10184 | 10182 | \tcode{p} have been destroyed. \end{note}
|
10185 | 10183 | \end{itemdescr}
|
10186 | 10184 |
|
10187 |
| -\rSec4[util.smartptr.shared.io]{\tcode{shared_ptr} I/O} |
| 10185 | +\rSec3[util.smartptr.shared.io]{\tcode{shared_ptr} I/O} |
10188 | 10186 |
|
10189 | 10187 | \indexlibrarymember{operator<<}{shared_ptr}%
|
10190 | 10188 | \begin{itemdecl}
|
|
10266 | 10264 | containers. The template parameter \tcode{T} of \tcode{weak_ptr} may be an
|
10267 | 10265 | incomplete type.
|
10268 | 10266 |
|
10269 |
| -\rSec4[util.smartptr.weak.const]{\tcode{weak_ptr} constructors} |
| 10267 | +\rSec3[util.smartptr.weak.const]{\tcode{weak_ptr} constructors} |
10270 | 10268 |
|
10271 | 10269 | \indexlibrary{\idxcode{weak_ptr}!constructor}%
|
10272 | 10270 | \begin{itemdecl}
|
|
10314 | 10312 | \tcode{r} shall be empty. \tcode{r.use_count() == 0}.
|
10315 | 10313 | \end{itemdescr}
|
10316 | 10314 |
|
10317 |
| -\rSec4[util.smartptr.weak.dest]{\tcode{weak_ptr} destructor} |
| 10315 | +\rSec3[util.smartptr.weak.dest]{\tcode{weak_ptr} destructor} |
10318 | 10316 |
|
10319 | 10317 | \indexlibrary{\idxcode{weak_ptr}!destructor}%
|
10320 | 10318 | \begin{itemdecl}
|
|
10326 | 10324 | effect on the object its stored pointer points to.
|
10327 | 10325 | \end{itemdescr}
|
10328 | 10326 |
|
10329 |
| -\rSec4[util.smartptr.weak.assign]{\tcode{weak_ptr} assignment} |
| 10327 | +\rSec3[util.smartptr.weak.assign]{\tcode{weak_ptr} assignment} |
10330 | 10328 |
|
10331 | 10329 | \indexlibrarymember{operator=}{weak_ptr}%
|
10332 | 10330 | \begin{itemdecl}
|
|
10356 | 10354 | \pnum\returns \tcode{*this}.
|
10357 | 10355 | \end{itemdescr}
|
10358 | 10356 |
|
10359 |
| -\rSec4[util.smartptr.weak.mod]{\tcode{weak_ptr} modifiers} |
| 10357 | +\rSec3[util.smartptr.weak.mod]{\tcode{weak_ptr} modifiers} |
10360 | 10358 | \indexlibrarymember{swap}{weak_ptr}%
|
10361 | 10359 | \begin{itemdecl}
|
10362 | 10360 | void swap(weak_ptr& r) noexcept;
|
|
10375 | 10373 | \pnum\effects Equivalent to \tcode{weak_ptr().swap(*this)}.
|
10376 | 10374 | \end{itemdescr}
|
10377 | 10375 |
|
10378 |
| -\rSec4[util.smartptr.weak.obs]{\tcode{weak_ptr} observers} |
| 10376 | +\rSec3[util.smartptr.weak.obs]{\tcode{weak_ptr} observers} |
10379 | 10377 | \indexlibrarymember{use_count}{weak_ptr}%
|
10380 | 10378 | \begin{itemdecl}
|
10381 | 10379 | long use_count() const noexcept;
|
|
10427 | 10425 | \end{itemdescr}
|
10428 | 10426 |
|
10429 | 10427 |
|
10430 |
| -\rSec4[util.smartptr.weak.spec]{\tcode{weak_ptr} specialized algorithms} |
| 10428 | +\rSec3[util.smartptr.weak.spec]{\tcode{weak_ptr} specialized algorithms} |
10431 | 10429 |
|
10432 | 10430 | \indexlibrarymember{swap}{weak_ptr}%
|
10433 | 10431 | \begin{itemdecl}
|
|
10439 | 10437 | \pnum\effects Equivalent to \tcode{a.swap(b)}.
|
10440 | 10438 | \end{itemdescr}
|
10441 | 10439 |
|
10442 |
| -\rSec3[util.smartptr.ownerless]{Class template \tcode{owner_less}} |
| 10440 | +\rSec2[util.smartptr.ownerless]{Class template \tcode{owner_less}} |
10443 | 10441 |
|
10444 | 10442 | \pnum
|
10445 | 10443 | The class template \tcode{owner_less} allows ownership-based mixed comparisons of shared
|
|
10490 | 10488 | both empty.
|
10491 | 10489 | \end{itemize} \end{note}
|
10492 | 10490 |
|
10493 |
| -\rSec3[util.smartptr.enab]{Class template \tcode{enable_shared_from_this}} |
| 10491 | +\rSec2[util.smartptr.enab]{Class template \tcode{enable_shared_from_this}} |
10494 | 10492 |
|
10495 | 10493 | \pnum
|
10496 | 10494 | \indexlibrary{\idxcode{enable_shared_from_this}}%
|
|
10580 | 10578 | \pnum\returns \tcode{weak_this}.
|
10581 | 10579 | \end{itemdescr}
|
10582 | 10580 |
|
10583 |
| -\rSec3[util.smartptr.shared.atomic]{\tcode{shared_ptr} atomic access} |
| 10581 | +\rSec2[util.smartptr.shared.atomic]{\tcode{shared_ptr} atomic access} |
10584 | 10582 |
|
10585 | 10583 | \pnum
|
10586 | 10584 | Concurrent access to a \tcode{shared_ptr} object from multiple threads does not
|
|
10789 | 10787 | The weak form may fail spuriously. See~\ref{atomics.types.operations}.
|
10790 | 10788 | \end{itemdescr}
|
10791 | 10789 |
|
10792 |
| -\rSec3[util.smartptr.hash]{Smart pointer hash support} |
| 10790 | +\rSec2[util.smartptr.hash]{Smart pointer hash support} |
10793 | 10791 |
|
10794 | 10792 | \indexlibrary{\idxcode{hash}!\idxcode{unique_ptr}}%
|
10795 | 10793 | \begin{itemdecl}
|
|
0 commit comments