Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions source/memory.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3331,10 +3331,10 @@
then \tcode{remove_cv_t<Y>*} shall be implicitly convertible to \tcode{T*} and
the constructor evaluates the statement:
\begin{codeblock}
if (p != nullptr && p->weak_this.expired())
p->weak_this = shared_ptr<remove_cv_t<Y>>(*this, const_cast<remove_cv_t<Y>*>(p));
if (p != nullptr && p->@\exposid{weak-this}@.expired())
p->@\exposid{weak-this}@ = shared_ptr<remove_cv_t<Y>>(*this, const_cast<remove_cv_t<Y>*>(p));
\end{codeblock}
The assignment to the \tcode{weak_this} member is not atomic and
The assignment to the \exposid{weak-this} member is not atomic and
conflicts with any potentially concurrent access to the same object\iref{intro.multithread}.

\indexlibraryctor{shared_ptr}%
Expand Down Expand Up @@ -5028,7 +5028,7 @@
weak_ptr<T const> weak_from_this() const noexcept;

private:
mutable weak_ptr<T> weak_this; // \expos
mutable weak_ptr<T> @\exposid{weak-this}@; // \expos
};
}
\end{codeblock}
Expand All @@ -5046,7 +5046,7 @@
\begin{itemdescr}
\pnum
\effects
Value-initializes \tcode{weak_this}.
Value-initializes \exposid{weak-this}.
\end{itemdescr}

\indexlibrarymember{operator=}{enable_shared_from_this}%
Expand All @@ -5061,7 +5061,7 @@

\pnum
\begin{note}
\tcode{weak_this} is not changed.
\exposid{weak-this} is not changed.
\end{note}
\end{itemdescr}

Expand All @@ -5075,7 +5075,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{shared_ptr<T>(weak_this)}.
\tcode{shared_ptr<T>(\exposid{weak-this})}.
\end{itemdescr}

\indexlibraryglobal{weak_ptr}%
Expand All @@ -5088,7 +5088,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{weak_this}.
\exposid{weak-this}.
\end{itemdescr}

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