Skip to content

Commit 4bb0543

Browse files
jensmaurertkoeppe
authored andcommitted
[thread] Fix and add cross-references in header synopses
1 parent 52d9b8e commit 4bb0543

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

source/threads.tex

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,13 +1106,15 @@
11061106
#include <compare> // see \ref{compare.syn}
11071107

11081108
namespace std {
1109+
// \ref{thread.thread.class}, class \tcode{thread}
11091110
class thread;
11101111

11111112
void swap(thread& x, thread& y) noexcept;
11121113

1113-
// \ref{thread.jthread.class} class \tcode{jthread}
1114+
// \ref{thread.jthread.class}, class \tcode{jthread}
11141115
class jthread;
11151116

1117+
// \ref{thread.thread.this}, namespace \tcode{this_thread}
11161118
namespace this_thread {
11171119
thread::id get_id() noexcept;
11181120

@@ -1149,7 +1151,7 @@
11491151
namespace std {
11501152
class thread {
11511153
public:
1152-
// types
1154+
// \ref{thread.thread.id}, class \tcode{thread::id}
11531155
class id;
11541156
using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
11551157

@@ -1162,7 +1164,7 @@
11621164
thread& operator=(const thread&) = delete;
11631165
thread& operator=(thread&&) noexcept;
11641166

1165-
// members
1167+
// \ref{thread.thread.member}, members
11661168
void swap(thread&) noexcept;
11671169
bool joinable() const noexcept;
11681170
void join();
@@ -2044,9 +2046,13 @@
20442046
\indexheader{mutex}%
20452047
\begin{codeblock}
20462048
namespace std {
2049+
// \ref{thread.mutex.class}, class \tcode{mutex}
20472050
class mutex;
2051+
// \ref{thread.mutex.recursive}, class \tcode{recursive_mutex}
20482052
class recursive_mutex;
2053+
// \ref{thread.timedmutex.class} class \tcode{timed_mutex}
20492054
class timed_mutex;
2055+
// \ref{thread.timedmutex.recursive}, class \tcode{recursive_timed_mutex}
20502056
class recursive_timed_mutex;
20512057

20522058
struct defer_lock_t { explicit defer_lock_t() = default; };
@@ -2057,13 +2063,15 @@
20572063
inline constexpr try_to_lock_t try_to_lock { };
20582064
inline constexpr adopt_lock_t adopt_lock { };
20592065

2066+
// \ref{thread.lock}, locks
20602067
template<class Mutex> class lock_guard;
20612068
template<class... MutexTypes> class scoped_lock;
20622069
template<class Mutex> class unique_lock;
20632070

20642071
template<class Mutex>
20652072
void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y) noexcept;
20662073

2074+
// \ref{thread.lock.algorithm}, generic locking algorithms
20672075
template<class L1, class L2, class... L3> int try_lock(L1&, L2&, L3&...);
20682076
template<class L1, class L2, class... L3> void lock(L1&, L2&, L3&...);
20692077

@@ -2079,8 +2087,11 @@
20792087
\indexheader{shared_mutex}%
20802088
\begin{codeblock}
20812089
namespace std {
2090+
// \ref{thread.sharedmutex.class}, class \tcode{shared_mutex}
20822091
class shared_mutex;
2092+
// \ref{thread.sharedtimedmutex.class}, class \tcode{shared_timed_mutex}
20832093
class shared_timed_mutex;
2094+
// \ref{thread.lock.shared}, class template \tcode{shared_lock}
20842095
template<class Mutex> class shared_lock;
20852096
template<class Mutex>
20862097
void swap(shared_lock<Mutex>& x, shared_lock<Mutex>& y) noexcept;
@@ -4313,9 +4324,12 @@
43134324
\indexlibraryglobal{cv_status}%
43144325
\begin{codeblock}
43154326
namespace std {
4327+
// \ref{thread.condition.condvar}, class \tcode{condition_variable}
43164328
class condition_variable;
4329+
// \ref{thread.condition.condvarany}, class \tcode{condition_variable_any}
43174330
class condition_variable_any;
43184331

4332+
// \ref{thread.condition.nonmember}, non-member functions
43194333
void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
43204334

43214335
enum class cv_status { no_timeout, timeout };
@@ -5246,6 +5260,7 @@
52465260
\indexheader{semaphore}%
52475261
\begin{codeblock}
52485262
namespace std {
5263+
// \ref{thread.sema.cnt}, class template \tcode{counting_semaphore}
52495264
template<ptrdiff_t least_max_value = @\impdef@>
52505265
class counting_semaphore;
52515266

@@ -5955,14 +5970,17 @@
59555970
deferred
59565971
};
59575972

5973+
// \ref{futures.errors}, error handling
59585974
template<> struct is_error_code_enum<future_errc> : public true_type { };
59595975
error_code make_error_code(future_errc e) noexcept;
59605976
error_condition make_error_condition(future_errc e) noexcept;
59615977

59625978
const error_category& future_category() noexcept;
59635979

5980+
// \ref{futures.future.error}, class \tcode{future_error}
59645981
class future_error;
59655982

5983+
// \ref{futures.promise}, class template \tcode{promise}
59665984
template<class R> class promise;
59675985
template<class R> class promise<R&>;
59685986
template<> class promise<void>;
@@ -5973,21 +5991,25 @@
59735991
template<class R, class Alloc>
59745992
struct uses_allocator<promise<R>, Alloc>;
59755993

5994+
// \ref{futures.unique.future}, class template \tcode{future}
59765995
template<class R> class future;
59775996
template<class R> class future<R&>;
59785997
template<> class future<void>;
59795998

5999+
// \ref{futures.shared.future}, class template \tcode{shared_future}
59806000
template<class R> class shared_future;
59816001
template<class R> class shared_future<R&>;
59826002
template<> class shared_future<void>;
59836003

6004+
// \ref{futures.task}, class template \tcode{packaged_task}
59846005
template<class> class packaged_task; // \notdef
59856006
template<class R, class... ArgTypes>
59866007
class packaged_task<R(ArgTypes...)>;
59876008

59886009
template<class R, class... ArgTypes>
59896010
void swap(packaged_task<R(ArgTypes...)>&, packaged_task<R(ArgTypes...)>&) noexcept;
59906011

6012+
// \ref{futures.async}, function template \tcode{async}
59916013
template<class F, class... Args>
59926014
[[nodiscard]] future<invoke_result_t<decay_t<F>, decay_t<Args>...>>
59936015
async(F&& f, Args&&... args);

0 commit comments

Comments
 (0)