Skip to content

Commit 75fdbc8

Browse files
burblebeetkoeppe
authored andcommitted
LWG3788 jthread::operator=(jthread&&) postconditions are unimplementable under self-assignment
1 parent 0077d29 commit 75fdbc8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

source/threads.tex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,19 +1756,18 @@
17561756
\begin{itemdescr}
17571757
\pnum
17581758
\effects
1759-
If \tcode{joinable()} is \tcode{true},
1760-
calls \tcode{request_stop()} and then \tcode{join()}.
1761-
Assigns the state of \tcode{x} to \tcode{*this}
1759+
If \tcode{\&x == this} is \tcode{true}, there are no effects.
1760+
Otherwise, if \tcode{joinable()} is \tcode{true},
1761+
calls \tcode{request_stop()} and then \tcode{join()},
1762+
then assigns the state of \tcode{x} to \tcode{*this}
17621763
and sets \tcode{x} to a default constructed state.
17631764

17641765
\pnum
17651766
\ensures
1766-
\tcode{x.get_id() == id()}
1767-
and \tcode{get_id()} returns the value of \tcode{x.get_id()}
1767+
\tcode{get_id()} returns the value of \tcode{x.get_id()}
17681768
prior to the assignment.
17691769
\tcode{ssource} has the value of \tcode{x.ssource}
1770-
prior to the assignment
1771-
and \tcode{x.ssource.stop_possible()} is \tcode{false}.
1770+
prior to the assignment.
17721771

17731772
\pnum
17741773
\returns

0 commit comments

Comments
 (0)