Skip to content

Commit 10c90ef

Browse files
committed
[thread] Harmonize presentation of synopses and declarations
1 parent 9680eb7 commit 10c90ef

File tree

1 file changed

+44
-47
lines changed

1 file changed

+44
-47
lines changed

source/threads.tex

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
public:
334334
// types:
335335
class id;
336-
using native_handle_type = @\impdef@; // See~\ref{thread.req.native}
336+
using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
337337

338338
// construct/copy/destroy:
339339
thread() noexcept;
@@ -350,10 +350,10 @@
350350
void join();
351351
void detach();
352352
id get_id() const noexcept;
353-
native_handle_type native_handle(); // See~\ref{thread.req.native}
353+
native_handle_type native_handle(); // see~\ref{thread.req.native}
354354

355355
// static members:
356-
static unsigned hardware_concurrency() noexcept;
356+
static unsigned int hardware_concurrency() noexcept;
357357
};
358358
}
359359
\end{codeblock}
@@ -366,7 +366,7 @@
366366
namespace std {
367367
class thread::id {
368368
public:
369-
id() noexcept;
369+
id() noexcept;
370370
};
371371

372372
bool operator==(thread::id x, thread::id y) noexcept;
@@ -378,7 +378,7 @@
378378

379379
template<class charT, class traits>
380380
basic_ostream<charT, traits>&
381-
operator<< (basic_ostream<charT, traits>& out, thread::id id);
381+
operator<<(basic_ostream<charT, traits>& out, thread::id id);
382382

383383
// Hash support
384384
template <class T> struct hash;
@@ -1036,8 +1036,8 @@
10361036
bool try_lock();
10371037
void unlock();
10381038

1039-
using native_handle_type = @\impdefnc@; // See~\ref{thread.req.native}
1040-
native_handle_type native_handle(); // See~\ref{thread.req.native}
1039+
using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
1040+
native_handle_type native_handle(); // see~\ref{thread.req.native}
10411041
};
10421042
}
10431043
\end{codeblock}
@@ -1091,8 +1091,8 @@
10911091
bool try_lock() noexcept;
10921092
void unlock();
10931093

1094-
using native_handle_type = @\impdefnc@; // See~\ref{thread.req.native}
1095-
native_handle_type native_handle(); // See~\ref{thread.req.native}
1094+
using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
1095+
native_handle_type native_handle(); // see~\ref{thread.req.native}
10961096
};
10971097
}
10981098
\end{codeblock}
@@ -1223,16 +1223,16 @@
12231223
timed_mutex(const timed_mutex&) = delete;
12241224
timed_mutex& operator=(const timed_mutex&) = delete;
12251225

1226-
void lock(); // blocking
1226+
void lock(); // blocking
12271227
bool try_lock();
12281228
template <class Rep, class Period>
12291229
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
12301230
template <class Clock, class Duration>
12311231
bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
12321232
void unlock();
12331233

1234-
using native_handle_type = @\impdefnc@; // See~\ref{thread.req.native}
1235-
native_handle_type native_handle(); // See~\ref{thread.req.native}
1234+
using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
1235+
native_handle_type native_handle(); // see~\ref{thread.req.native}
12361236
};
12371237
}
12381238
\end{codeblock}
@@ -1274,16 +1274,16 @@
12741274
recursive_timed_mutex(const recursive_timed_mutex&) = delete;
12751275
recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete;
12761276

1277-
void lock(); // blocking
1277+
void lock(); // blocking
12781278
bool try_lock() noexcept;
12791279
template <class Rep, class Period>
12801280
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
12811281
template <class Clock, class Duration>
12821282
bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
12831283
void unlock();
12841284

1285-
using native_handle_type = @\impdefnc@; // See~\ref{thread.req.native}
1286-
native_handle_type native_handle(); // See~\ref{thread.req.native}
1285+
using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
1286+
native_handle_type native_handle(); // see~\ref{thread.req.native}
12871287
};
12881288
}
12891289
\end{codeblock}
@@ -1444,7 +1444,7 @@
14441444
shared_mutex& operator=(const shared_mutex&) = delete;
14451445

14461446
// Exclusive ownership
1447-
void lock(); // blocking
1447+
void lock(); // blocking
14481448
bool try_lock();
14491449
void unlock();
14501450

@@ -1453,8 +1453,8 @@
14531453
bool try_lock_shared();
14541454
void unlock_shared();
14551455

1456-
using native_handle_type = @\impdefnc@; // See~\ref{thread.req.native}
1457-
native_handle_type native_handle(); // See~\ref{thread.req.native}
1456+
using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
1457+
native_handle_type native_handle(); // see~\ref{thread.req.native}
14581458
};
14591459
}
14601460
\end{codeblock}
@@ -1579,7 +1579,7 @@
15791579
shared_timed_mutex& operator=(const shared_timed_mutex&) = delete;
15801580

15811581
// Exclusive ownership
1582-
void lock(); // blocking
1582+
void lock(); // blocking
15831583
bool try_lock();
15841584
template <class Rep, class Period>
15851585
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
@@ -1588,14 +1588,12 @@
15881588
void unlock();
15891589

15901590
// Shared ownership
1591-
void lock_shared(); // blocking
1591+
void lock_shared(); // blocking
15921592
bool try_lock_shared();
15931593
template <class Rep, class Period>
1594-
bool
1595-
try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time);
1594+
bool try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time);
15961595
template <class Clock, class Duration>
1597-
bool
1598-
try_lock_shared_until(const chrono::time_point<Clock, Duration>& abs_time);
1596+
bool try_lock_shared_until(const chrono::time_point<Clock, Duration>& abs_time);
15991597
void unlock_shared();
16001598
};
16011599
}
@@ -1671,7 +1669,7 @@
16711669
lock_guard& operator=(const lock_guard&) = delete;
16721670

16731671
private:
1674-
mutex_type& pm; // \expos
1672+
mutex_type& pm; // \expos
16751673
};
16761674

16771675
template<class Mutex> lock_guard(lock_guard<Mutex>) -> lock_guard<Mutex>;
@@ -1739,7 +1737,7 @@
17391737
template <class... MutexTypes>
17401738
class scoped_lock {
17411739
public:
1742-
using mutex_type = Mutex; // If \tcode{MutexTypes...} consists of the single type \tcode{Mutex}
1740+
using mutex_type = Mutex; // If \tcode{MutexTypes...} consists of the single type \tcode{Mutex}
17431741

17441742
explicit scoped_lock(MutexTypes&... m);
17451743
explicit scoped_lock(adopt_lock_t, MutexTypes&... m);
@@ -1749,7 +1747,7 @@
17491747
scoped_lock& operator=(const scoped_lock&) = delete;
17501748

17511749
private:
1752-
tuple<MutexTypes&...> pm; // \expos
1750+
tuple<MutexTypes&...> pm; // \expos
17531751
};
17541752

17551753
template<class... MutexTypes>
@@ -1863,8 +1861,8 @@
18631861
mutex_type* mutex() const noexcept;
18641862

18651863
private:
1866-
mutex_type* pm; // \expos
1867-
bool owns; // \expos
1864+
mutex_type* pm; // \expos
1865+
bool owns; // \expos
18681866
};
18691867

18701868
template<class Mutex> unique_lock(unique_lock<Mutex>) -> unique_lock<Mutex>;
@@ -2271,16 +2269,14 @@
22712269

22722270
// \ref{thread.lock.shared.cons}, construct/copy/destroy
22732271
shared_lock() noexcept;
2274-
explicit shared_lock(mutex_type& m); // blocking
2272+
explicit shared_lock(mutex_type& m); // blocking
22752273
shared_lock(mutex_type& m, defer_lock_t) noexcept;
22762274
shared_lock(mutex_type& m, try_to_lock_t);
22772275
shared_lock(mutex_type& m, adopt_lock_t);
22782276
template <class Clock, class Duration>
2279-
shared_lock(mutex_type& m,
2280-
const chrono::time_point<Clock, Duration>& abs_time);
2277+
shared_lock(mutex_type& m, const chrono::time_point<Clock, Duration>& abs_time);
22812278
template <class Rep, class Period>
2282-
shared_lock(mutex_type& m,
2283-
const chrono::duration<Rep, Period>& rel_time);
2279+
shared_lock(mutex_type& m, const chrono::duration<Rep, Period>& rel_time);
22842280
~shared_lock();
22852281

22862282
shared_lock(const shared_lock&) = delete;
@@ -2290,7 +2286,7 @@
22902286
shared_lock& operator=(shared_lock&& u) noexcept;
22912287

22922288
// \ref{thread.lock.shared.locking}, locking
2293-
void lock(); // blocking
2289+
void lock(); // blocking
22942290
bool try_lock();
22952291
template <class Rep, class Period>
22962292
bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
@@ -2308,8 +2304,8 @@
23082304
mutex_type* mutex() const noexcept;
23092305

23102306
private:
2311-
mutex_type* pm; // \expos
2312-
bool owns; // \expos
2307+
mutex_type* pm; // \expos
2308+
bool owns; // \expos
23132309
};
23142310

23152311
template<class Mutex> shared_lock(shared_lock<Mutex>) -> shared_lock<Mutex>;
@@ -2551,8 +2547,7 @@
25512547
\indexlibrarymember{try_lock_until}{shared_lock}%
25522548
\begin{itemdecl}
25532549
template <class Clock, class Duration>
2554-
bool
2555-
try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
2550+
bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
25562551
\end{itemdecl}
25572552

25582553
\begin{itemdescr}
@@ -2963,7 +2958,6 @@
29632958
namespace std {
29642959
class condition_variable {
29652960
public:
2966-
29672961
condition_variable();
29682962
~condition_variable();
29692963

@@ -2982,7 +2976,6 @@
29822976
bool wait_until(unique_lock<mutex>& lock,
29832977
const chrono::time_point<Clock, Duration>& abs_time,
29842978
Predicate pred);
2985-
29862979
template <class Rep, class Period>
29872980
cv_status wait_for(unique_lock<mutex>& lock,
29882981
const chrono::duration<Rep, Period>& rel_time);
@@ -2991,8 +2984,8 @@
29912984
const chrono::duration<Rep, Period>& rel_time,
29922985
Predicate pred);
29932986

2994-
using native_handle_type = @\impdefnc@; // See~\ref{thread.req.native}
2995-
native_handle_type native_handle(); // See~\ref{thread.req.native}
2987+
using native_handle_type = @\impdefnc@; // see~\ref{thread.req.native}
2988+
native_handle_type native_handle(); // see~\ref{thread.req.native}
29962989
};
29972990
}
29982991
\end{codeblock}
@@ -3371,12 +3364,11 @@
33713364
cv_status wait_until(Lock& lock, const chrono::time_point<Clock, Duration>& abs_time);
33723365
template <class Lock, class Clock, class Duration, class Predicate>
33733366
bool wait_until(Lock& lock, const chrono::time_point<Clock, Duration>& abs_time,
3374-
Predicate pred);
3367+
Predicate pred);
33753368
template <class Lock, class Rep, class Period>
33763369
cv_status wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time);
33773370
template <class Lock, class Rep, class Period, class Predicate>
3378-
bool wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time,
3379-
Predicate pred);
3371+
bool wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time, Predicate pred);
33803372
};
33813373
}
33823374
\end{codeblock}
@@ -3751,8 +3743,9 @@
37513743

37523744
const error_code& code() const noexcept;
37533745
const char* what() const noexcept;
3746+
37543747
private:
3755-
error_code ec_; // \expos
3748+
error_code ec_; // \expos
37563749
};
37573750
}
37583751
\end{codeblock}
@@ -3931,8 +3924,10 @@
39313924
void set_value_at_thread_exit(@\seebelow@);
39323925
void set_exception_at_thread_exit(exception_ptr p);
39333926
};
3927+
39343928
template <class R>
39353929
void swap(promise<R>& x, promise<R>& y) noexcept;
3930+
39363931
template <class R, class Alloc>
39373932
struct uses_allocator<promise<R>, Alloc>;
39383933
}
@@ -5010,8 +5005,10 @@
50105005

50115006
void reset();
50125007
};
5008+
50135009
template <class R, class... ArgTypes>
50145010
void swap(packaged_task<R(ArgTypes...)>& x, packaged_task<R(ArgTypes...)>& y) noexcept;
5011+
50155012
template <class R, class Alloc>
50165013
struct uses_allocator<packaged_task<R>, Alloc>;
50175014
}

0 commit comments

Comments
 (0)