Skip to content

Commit 59778a2

Browse files
author
Dawn Perchik
committed
LWG2577 {shared,unique}_lock should use std::addressof
1 parent d6d3839 commit 59778a2

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

source/threads.tex

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@
18361836
\effects Constructs an object of type \tcode{unique_lock} and calls \tcode{m.lock()}.
18371837

18381838
\pnum
1839-
\postconditions \tcode{pm == \&m} and \tcode{owns == true}.
1839+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == true}.
18401840
\end{itemdescr}
18411841

18421842
\indexlibrary{\idxcode{unique_lock}!constructor}%
@@ -1849,7 +1849,7 @@
18491849
\effects Constructs an object of type \tcode{unique_lock}.
18501850

18511851
\pnum
1852-
\postconditions \tcode{pm == \&m} and \tcode{owns == false}.
1852+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == false}.
18531853
\end{itemdescr}
18541854

18551855
\indexlibrary{\idxcode{unique_lock}!constructor}%
@@ -1868,8 +1868,8 @@
18681868
\effects Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock()}.
18691869

18701870
\pnum
1871-
\postconditions \tcode{pm == \&m} and \tcode{owns == res}, where \tcode{res} is
1872-
the value returned by the call to \tcode{m.try_lock()}.
1871+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == res},
1872+
where \tcode{res} is the value returned by the call to \tcode{m.try_lock()}.
18731873
\end{itemdescr}
18741874

18751875
\indexlibrary{\idxcode{unique_lock}!constructor}%
@@ -1885,7 +1885,7 @@
18851885
\effects Constructs an object of type \tcode{unique_lock}.
18861886

18871887
\pnum
1888-
\postconditions \tcode{pm == \&m} and \tcode{owns == true}.
1888+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == true}.
18891889

18901890
\pnum
18911891
\throws Nothing.
@@ -1907,7 +1907,8 @@
19071907
\effects Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock_until(abs_time)}.
19081908

19091909
\pnum
1910-
\postconditions \tcode{pm == \&m} and \tcode{owns == res}, where \tcode{res} is
1910+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == res},
1911+
where \tcode{res} is
19111912
the value returned by the call to \tcode{m.try_lock_until(abs_time)}.
19121913
\end{itemdescr}
19131914

@@ -1926,7 +1927,8 @@
19261927
\effects Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock_for(rel_time)}.
19271928

19281929
\pnum
1929-
\postconditions \tcode{pm == \&m} and \tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{m.try_lock_for(rel_time)}.
1930+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == res},
1931+
where \tcode{res} is the value returned by the call to \tcode{m.try_lock_for(rel_time)}.
19301932
\end{itemdescr}
19311933

19321934
\indexlibrary{\idxcode{unique_lock}!constructor}%
@@ -2264,7 +2266,7 @@
22642266
\effects Constructs an object of type \tcode{shared_lock} and calls \tcode{m.lock_shared()}.
22652267

22662268
\pnum
2267-
\postconditions \tcode{pm == \&m} and \tcode{owns == true}.
2269+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == true}.
22682270
\end{itemdescr}
22692271

22702272
\indexlibrary{\idxcode{shared_lock}!constructor}%
@@ -2277,7 +2279,7 @@
22772279
\effects Constructs an object of type \tcode{shared_lock}.
22782280

22792281
\pnum
2280-
\postconditions \tcode{pm == \&m} and \tcode{owns == false}.
2282+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == false}.
22812283
\end{itemdescr}
22822284

22832285
\indexlibrary{\idxcode{shared_lock}!constructor}%
@@ -2293,7 +2295,8 @@
22932295
\effects Constructs an object of type \tcode{shared_lock} and calls \tcode{m.try_lock_shared()}.
22942296

22952297
\pnum
2296-
\postconditions \tcode{pm == \&m} and \tcode{owns == res} where \tcode{res} is the
2298+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == res}
2299+
where \tcode{res} is the
22972300
value returned by the call to \tcode{m.try_lock_shared()}.
22982301
\end{itemdescr}
22992302

@@ -2310,7 +2313,7 @@
23102313
\effects Constructs an object of type \tcode{shared_lock}.
23112314

23122315
\pnum
2313-
\postconditions \tcode{pm == \&m} and \tcode{owns == true}.
2316+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == true}.
23142317
\end{itemdescr}
23152318

23162319
\indexlibrary{\idxcode{shared_lock}!constructor}%
@@ -2329,7 +2332,8 @@
23292332
\tcode{m.try_lock_shared_until(abs_time)}.
23302333

23312334
\pnum
2332-
\postconditions \tcode{pm == \&m} and \tcode{owns == res} where \tcode{res}
2335+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == res}
2336+
where \tcode{res}
23332337
is the value returned by the call to \tcode{m.try_lock_shared_until(abs_time)}.
23342338
\end{itemdescr}
23352339

@@ -2349,7 +2353,8 @@
23492353
\tcode{m.try_lock_shared_for(rel_time)}.
23502354

23512355
\pnum
2352-
\postconditions \tcode{pm == \&m} and \tcode{owns == res} where \tcode{res} is
2356+
\postconditions \tcode{pm == addressof(m)} and \tcode{owns == res}
2357+
where \tcode{res} is
23532358
the value returned by the call to \tcode{m.try_lock_shared_for(rel_time)}.
23542359
\end{itemdescr}
23552360

0 commit comments

Comments
 (0)