Skip to content

Commit ff8733a

Browse files
authored
[util.smartptr.{enab, shared.const}] Restyle expos-only member "weak-this" (#7590)
1 parent c11340c commit ff8733a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

source/memory.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3331,10 +3331,10 @@
33313331
then \tcode{remove_cv_t<Y>*} shall be implicitly convertible to \tcode{T*} and
33323332
the constructor evaluates the statement:
33333333
\begin{codeblock}
3334-
if (p != nullptr && p->weak_this.expired())
3335-
p->weak_this = shared_ptr<remove_cv_t<Y>>(*this, const_cast<remove_cv_t<Y>*>(p));
3334+
if (p != nullptr && p->@\exposid{weak-this}@.expired())
3335+
p->@\exposid{weak-this}@ = shared_ptr<remove_cv_t<Y>>(*this, const_cast<remove_cv_t<Y>*>(p));
33363336
\end{codeblock}
3337-
The assignment to the \tcode{weak_this} member is not atomic and
3337+
The assignment to the \exposid{weak-this} member is not atomic and
33383338
conflicts with any potentially concurrent access to the same object\iref{intro.multithread}.
33393339

33403340
\indexlibraryctor{shared_ptr}%
@@ -5028,7 +5028,7 @@
50285028
weak_ptr<T const> weak_from_this() const noexcept;
50295029

50305030
private:
5031-
mutable weak_ptr<T> weak_this; // \expos
5031+
mutable weak_ptr<T> @\exposid{weak-this}@; // \expos
50325032
};
50335033
}
50345034
\end{codeblock}
@@ -5046,7 +5046,7 @@
50465046
\begin{itemdescr}
50475047
\pnum
50485048
\effects
5049-
Value-initializes \tcode{weak_this}.
5049+
Value-initializes \exposid{weak-this}.
50505050
\end{itemdescr}
50515051

50525052
\indexlibrarymember{operator=}{enable_shared_from_this}%
@@ -5061,7 +5061,7 @@
50615061

50625062
\pnum
50635063
\begin{note}
5064-
\tcode{weak_this} is not changed.
5064+
\exposid{weak-this} is not changed.
50655065
\end{note}
50665066
\end{itemdescr}
50675067

@@ -5075,7 +5075,7 @@
50755075
\begin{itemdescr}
50765076
\pnum
50775077
\returns
5078-
\tcode{shared_ptr<T>(weak_this)}.
5078+
\tcode{shared_ptr<T>(\exposid{weak-this})}.
50795079
\end{itemdescr}
50805080

50815081
\indexlibraryglobal{weak_ptr}%
@@ -5088,7 +5088,7 @@
50885088
\begin{itemdescr}
50895089
\pnum
50905090
\returns
5091-
\tcode{weak_this}.
5091+
\exposid{weak-this}.
50925092
\end{itemdescr}
50935093

50945094
\rSec2[util.smartptr.hash]{Smart pointer hash support}

0 commit comments

Comments
 (0)