From 99fac6b19fd2dd2044240f2dc9f600ea408afb7b Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 15 Aug 2019 11:40:19 -0700 Subject: [PATCH 01/99] Update configuration for building drafts after N4830. --- source/config.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/config.tex b/source/config.tex index 6e6488607d..efac481081 100644 --- a/source/config.tex +++ b/source/config.tex @@ -1,8 +1,8 @@ %!TEX root = std.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4830} -\newcommand{\prevdocno}{N4820} +\newcommand{\docno}{Dxxxx} +\newcommand{\prevdocno}{N4830} \newcommand{\cppver}{201703L} %% Release date From 4fe8325ff6cf63055f9d064ba1b4f24614863649 Mon Sep 17 00:00:00 2001 From: "S. B. Tam" Date: Tue, 20 Aug 2019 05:14:29 +0800 Subject: [PATCH 02/99] [thread.jthread.class] fix typos (#3183) --- source/threads.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index 4008063c68..29453f4acb 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -1390,7 +1390,7 @@ [[nodiscard]] id get_id() const noexcept; [[nodiscard]] native_handle_type native_handle(); // see~\ref{thread.req.native} - // \ref{thread.jthread.mem}, stop token handling + // \ref{thread.jthread.stop}, stop token handling [[nodiscard]] stop_source get_stop_source() noexcept; [[nodiscard]] stop_token get_stop_token() const noexcept; bool request_stop() noexcept; @@ -1663,7 +1663,7 @@ \indexlibrarymember{get_stop_source}{jthread}% \begin{itemdecl} -[[nodiscard]] stop_source get_stop_source() noexcept +[[nodiscard]] stop_source get_stop_source() noexcept; \end{itemdecl} \begin{itemdescr} @@ -1673,7 +1673,7 @@ \indexlibrarymember{get_stop_token}{jthread}% \begin{itemdecl} -[[nodiscard]] stop_token get_stop_token() const noexcept +[[nodiscard]] stop_token get_stop_token() const noexcept; \end{itemdecl} \begin{itemdescr} From f30cb7d78ec3507ba543a0decde89dfbed49689e Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Mon, 19 Aug 2019 17:15:10 -0400 Subject: [PATCH 03/99] [ostream] Fix indentation for operator<<(..., const char32_t*) = delete. --- source/iostreams.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index 52b9db824e..9fe40010bb 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -5870,7 +5870,7 @@ operator<<(basic_ostream&, const char16_t*) = delete; template basic_ostream& - operator<<(basic_ostream&, const char32_t*) = delete; + operator<<(basic_ostream&, const char32_t*) = delete; template basic_ostream& operator<<(basic_ostream&, const char8_t*) = delete; From aaea74e8dcfa456043ec315511463fb6d4a80108 Mon Sep 17 00:00:00 2001 From: David Olsen Date: Mon, 19 Aug 2019 14:17:33 -0700 Subject: [PATCH 04/99] [atomics.ref.operations] Change Expects to Effects for atomic_ref::notify_{one,all} (#3180) Fix an editorial issue that resulted from an incorrect merge. In the description of atomic_ref::notify_one and atomic_ref::notify_all in [atomics.ref.operations] p25 and p27, N4830 has "Expects" in both of those paragraphs. But the paper that was merged in, P1643R1 ( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1643r1.html ) has "Effects". "Effects" is correct, and it matches notify_one and notify_all in the four other atomics-related classes. --- source/atomics.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/atomics.tex b/source/atomics.tex index 101a09b4e6..b7365dabb9 100644 --- a/source/atomics.tex +++ b/source/atomics.tex @@ -1063,7 +1063,7 @@ \begin{itemdescr} \pnum -\expects +\effects Unblocks the execution of at least one atomic waiting operation on \tcode{*ptr} that is eligible to be unblocked\iref{atomics.wait} by this call, if any such atomic waiting operations exist. @@ -1081,7 +1081,7 @@ \begin{itemdescr} \pnum -\expects +\effects Unblocks the execution of all atomic waiting operations on \tcode{*ptr} that are eligible to be unblocked\iref{atomics.wait} by this call. From 5b26ba572a2ab3a1094e0f3284fbf2328969b78c Mon Sep 17 00:00:00 2001 From: Eelis Date: Mon, 19 Aug 2019 23:18:05 +0200 Subject: [PATCH 05/99] [format.context] Use \indextext, not \index. (#3179) --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index b80f3f3dc3..13c826e620 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -20806,7 +20806,7 @@ \effects Equivalent to: \tcode{out_ = it;} \end{itemdescr} -\index{left-pad}% +\indextext{left-pad}% \begin{example} \begin{codeblock} struct S { int value; }; From 538f7c69f1423551628fdc638e8c4654bf1c7662 Mon Sep 17 00:00:00 2001 From: Eelis Date: Mon, 19 Aug 2019 23:20:53 +0200 Subject: [PATCH 06/99] [std] Add/fix periods at end of sentences. (#3177) --- source/algorithms.tex | 6 +++--- source/classes.tex | 2 +- source/expressions.tex | 2 +- source/iostreams.tex | 12 ++++++------ source/lib-intro.tex | 2 +- source/regex.tex | 4 ++-- source/support.tex | 2 +- source/templates.tex | 2 +- source/threads.tex | 2 +- source/time.tex | 2 +- source/utilities.tex | 6 +++--- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index c2518033ec..29a254a55f 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3132,7 +3132,7 @@ \begin{itemdescr} \pnum \requires -\tcode{Function} shall meet the \oldconcept{MoveConstructible} requirements +\tcode{Function} shall meet the \oldconcept{MoveConstructible} requirements. \begin{note} \tcode{Function} need not meet the requirements of \oldconcept{CopyConstructible}. @@ -5304,7 +5304,7 @@ \returns \begin{itemize} \item \tcode{result + $N$} for the overloads in namespace \tcode{std}, or -\item \tcode{\{last, result + $N$\}} for the overloads in namespace \tcode{ranges} +\item \tcode{\{last, result + $N$\}} for the overloads in namespace \tcode{ranges}. \end{itemize} \pnum @@ -6849,7 +6849,7 @@ An iterator \tcode{mid} such that $E(\tcode{*i})$ is \tcode{true} for all iterators \tcode{i} in \range{first}{mid}, and -\tcode{false} for all iterators \tcode{i} in \range{mid}{last} +\tcode{false} for all iterators \tcode{i} in \range{mid}{last}. \pnum \complexity diff --git a/source/classes.tex b/source/classes.tex index 7c14167ec5..f4a6513bd3 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -4162,7 +4162,7 @@ \end{example} \begin{note} A function declaration cannot provide both a \grammarterm{pure-specifier} -and a definition +and a definition. \end{note} \begin{example} \begin{codeblock} diff --git a/source/expressions.tex b/source/expressions.tex index add9621513..ae70f5e7ff 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -3310,7 +3310,7 @@ The value of a postfix \tcode{++} expression is the value of its operand. \begin{note} -The value obtained is a copy of the original value +The value obtained is a copy of the original value. \end{note} The operand shall be a modifiable lvalue. The type of the operand shall be an arithmetic type other than \cv{}~\tcode{bool}, diff --git a/source/iostreams.tex b/source/iostreams.tex index 9fe40010bb..ca8ffe6189 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -3754,7 +3754,7 @@ call this virtual function only if \tcode{gptr()} is null or -\tcode{gptr() >= egptr()} +\tcode{gptr() >= egptr()}. \pnum \returns @@ -4529,7 +4529,7 @@ During preparation, the constructor may call \tcode{setstate(failbit)} (which may throw -\tcode{ios_base::\brk{}failure}\iref{iostate.flags})\footnote{The +\tcode{ios_base::\brk{}failure}\iref{iostate.flags}).\footnote{The \tcode{sentry} constructor and destructor can also perform additional @@ -4974,7 +4974,7 @@ Otherwise, the function calls \tcode{setstate(failbit)}, which may throw -\tcode{ios_base::failure}\iref{iostate.flags}, +\tcode{ios_base::failure}\iref{iostate.flags}. \pnum \returns @@ -6064,7 +6064,7 @@ During preparation, the constructor may call \tcode{setstate(failbit)} (which may throw -\tcode{ios_base::\brk{}failure}\iref{iostate.flags})\footnote{The +\tcode{ios_base::\brk{}failure}\iref{iostate.flags}).\footnote{The \tcode{sentry} constructor and destructor can also perform additional @@ -14803,7 +14803,7 @@ \pnum \begin{note} By default, \tcode{recursive_directory_iterator} does not follow directory symlinks. To follow directory symlinks, specify \tcode{options} as -\tcode{directory_options::follow_directory_symlink} \end{note} +\tcode{directory_options::follow_directory_symlink}. \end{note} \end{itemdescr} \indexlibrary{\idxcode{recursive_directory_iterator}!constructor}% @@ -15942,7 +15942,7 @@ \returns \tcode{is_regular_file(status(p))}. \pnum -\throws \tcode{filesystem_error} if \tcode{status(p)} would throw \tcode{filesystem_error.} +\throws \tcode{filesystem_error} if \tcode{status(p)} would throw \tcode{filesystem_error}. \end{itemdescr} \indexlibrary{\idxcode{is_regular_file}}% diff --git a/source/lib-intro.tex b/source/lib-intro.tex index a02432e3f0..5737f15c86 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -2594,7 +2594,7 @@ \item \indexlibrary{\idxcode{open_mode}!zombie} \tcode{open_mode}, \item \indexlibrary{\idxcode{second_argument_type}!zombie} \tcode{second_argument_type}, and -\item \indexlibrary{\idxcode{seek_dir}!zombie} \tcode{seek_dir}, +\item \indexlibrary{\idxcode{seek_dir}!zombie} \tcode{seek_dir}. \end{itemize} \pnum diff --git a/source/regex.tex b/source/regex.tex index a9b0dbb6f2..0699c284cd 100644 --- a/source/regex.tex +++ b/source/regex.tex @@ -1203,7 +1203,7 @@ takes, nor how it is accessed by algorithms that operate on regular expressions. \begin{note} Implementations will typically declare some function templates as friends of \tcode{basic_regex} to achieve -this \end{note} +this. \end{note} \pnum \indexlibrary{\idxcode{regex_error}}% @@ -3299,7 +3299,7 @@ \begin{note} For a suffix iterator, data member \tcode{suffix.first} is the same as the end of the last match found, and \tcode{suffix\brk.second} is the same as the end of the target -sequence \end{note} +sequence. \end{note} \pnum The \textit{current match} is \tcode{(*position).prefix()} if \tcode{subs[N] == -1}, or diff --git a/source/support.tex b/source/support.tex index dcd1a4129d..4830c3a735 100644 --- a/source/support.tex +++ b/source/support.tex @@ -3110,7 +3110,7 @@ \remarks The message may be a null-terminated multibyte string\iref{multibyte.strings}, suitable for conversion and display as a -\tcode{wstring}~(\ref{string.classes}, \ref{locale.codecvt}) +\tcode{wstring}~(\ref{string.classes}, \ref{locale.codecvt}). \end{itemdescr} \rSec2[bad.cast]{Class \tcode{bad_cast}} diff --git a/source/templates.tex b/source/templates.tex index 1682ce7b19..58e154d43c 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -7938,7 +7938,7 @@ \item If the original \tcode{A} is a reference type, \tcode{A} can be more cv-qualified than the deduced \tcode{A} -(i.e., the type referred to by the reference) +(i.e., the type referred to by the reference). \item If the original \tcode{A} is a function pointer type, \tcode{A} can be ``pointer to function'' diff --git a/source/threads.tex b/source/threads.tex index 29453f4acb..0508835627 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -3691,7 +3691,7 @@ \begin{itemdescr} \pnum -\requires Each template parameter type shall meet the \oldconcept{Lockable} requirements, +\requires Each template parameter type shall meet the \oldconcept{Lockable} requirements. \begin{note} The \tcode{unique_lock} class template meets these requirements when suitably instantiated. \end{note} diff --git a/source/time.tex b/source/time.tex index a17ac52108..8e7f6da4a8 100644 --- a/source/time.tex +++ b/source/time.tex @@ -6395,7 +6395,7 @@ which efficiently supports \tcode{days}-oriented arithmetic. \end{note} \tcode{year_month_day_last} is \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}), +and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}). \pnum \tcode{year_month_day_last} is a trivially copyable and standard-layout class type. diff --git a/source/utilities.tex b/source/utilities.tex index 13c826e620..b3f3c0d588 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -435,7 +435,7 @@ The type \tcode{make_integer_sequence} denotes the type \tcode{integer_sequence}. \begin{note} \tcode{make_integer_sequence} denotes the type -\tcode{integer_sequence} \end{note} +\tcode{integer_sequence}. \end{note} \end{itemdescr} \rSec1[pairs]{Pairs} @@ -9424,7 +9424,7 @@ \end{itemize} \begin{note} -This replaces the overload-resolution specification of the primary template +This replaces the overload-resolution specification of the primary template. \end{note} \end{itemdescr} @@ -9451,7 +9451,7 @@ \end{itemize} \begin{note} -This replaces the overload-resolution specification of the primary template +This replaces the overload-resolution specification of the primary template. \end{note} \end{itemdescr} From 600f1c0d1e94b0b6198c99516a95ec5ba439237a Mon Sep 17 00:00:00 2001 From: Eelis Date: Mon, 19 Aug 2019 23:22:26 +0200 Subject: [PATCH 07/99] [std] Use consistent punctuation to terminate non-final list items. (#3175) --- source/basic.tex | 2 +- source/classes.tex | 2 +- source/locales.tex | 2 +- source/support.tex | 2 +- source/utilities.tex | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 553516a7b2..ccda696b31 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -2068,7 +2068,7 @@ \item the names in a \grammarterm{template-argument} of a \grammarterm{template-id} are looked up in the context in which the entire -\grammarterm{postfix-expression} occurs. +\grammarterm{postfix-expression} occurs; \item the lookup for a name specified in a \grammarterm{using-declaration}\iref{namespace.udecl} also finds class or diff --git a/source/classes.tex b/source/classes.tex index f4a6513bd3..32fac86631 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -1368,7 +1368,7 @@ \item any non-variant non-static data member of const-qualified type (or array thereof) with no \grammarterm{brace-or-equal-initializer} -is not const-default-constructible\iref{dcl.init}. +is not const-default-constructible\iref{dcl.init}, \item \tcode{X} is a union and all of its variant members are of const-qualified type (or array thereof), diff --git a/source/locales.tex b/source/locales.tex index 11a2836e83..a763aa1138 100644 --- a/source/locales.tex +++ b/source/locales.tex @@ -2858,7 +2858,7 @@ determined by stage 1 to a \tcode{charT} using a conversion and values returned by members of -\tcode{use_facet>(loc)} +\tcode{use_facet>(loc)}. \item Stage 3: Determine where padding is required. diff --git a/source/support.tex b/source/support.tex index 4830c3a735..6a7d4d58eb 100644 --- a/source/support.tex +++ b/source/support.tex @@ -5816,7 +5816,7 @@ \item a call to any standard library function, except for plain lock-free atomic operations and -functions explicitly identified as signal-safe. +functions explicitly identified as signal-safe; \begin{note} This implicitly excludes the use of \tcode{new} and \tcode{delete} expressions that rely on a library-provided memory allocator. diff --git a/source/utilities.tex b/source/utilities.tex index b3f3c0d588..20ac04e067 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -18025,7 +18025,7 @@ of \tcode{A}'s cv and reference qualifiers, for a non-reference cv-unqualified type \tcode{U}, \item \tcode{\placeholdernc{COPYCV}(FROM, TO)} be an alias for type \tcode{TO} - with the addition of \tcode{FROM}'s top-level cv-qualifiers. + with the addition of \tcode{FROM}'s top-level cv-qualifiers, \begin{example} \tcode{\placeholdernc{COPYCV}(const int, volatile short)} is an alias for \tcode{const volatile short}. From fc240342df42f090563ed09c991c01925f1f4f27 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Mon, 19 Aug 2019 23:31:56 +0200 Subject: [PATCH 08/99] [tuple.elem] Canonicalize comments in example. (#3161) --- source/utilities.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 20ac04e067..70d1c66f18 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -1901,9 +1901,9 @@ \begin{example} \begin{codeblock} const tuple t(1, 2, 3.4, 5.6); - const int& i1 = get(t); // OK. Not ambiguous. \tcode{i1 == 1} - const int& i2 = get(t); // OK. Not ambiguous. \tcode{i2 == 2} - const double& d = get(t); // ERROR. ill-formed + const int& i1 = get(t); // OK, \tcode{i1} has value \tcode{1} + const int& i2 = get(t); // OK, \tcode{i2} has value \tcode{2} + const double& d = get(t); // error: type \tcode{double} is not unique within \tcode{t} \end{codeblock} \end{example} \end{itemdescr} From deb086c434dcaf864221f51e887477c0842aad2b Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Mon, 19 Aug 2019 23:33:03 +0200 Subject: [PATCH 09/99] [func.wrap.func,rand] Index 'result_type'. (#3154) --- source/numerics.tex | 28 ++++++++++++++++++++++++++++ source/utilities.tex | 1 + 2 files changed, 29 insertions(+) diff --git a/source/numerics.tex b/source/numerics.tex index 7dbfdb9854..59f7d32285 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2998,6 +2998,7 @@ is $\mathsf{GA}(\state{x}{i}) = \state{x}{i+1}$. \indexlibrary{\idxcode{linear_congruential_engine}}% +\indexlibrarymember{result_type}{linear_congruential_engine}% \begin{codeblock} template class linear_congruential_engine { @@ -3154,6 +3155,7 @@ \end{itemize} \indexlibrary{\idxcode{mersenne_twister_engine}}% +\indexlibrarymember{result_type}{mersenne_twister_engine}% \begin{codeblock} template class subtract_with_carry_engine { @@ -3525,6 +3528,7 @@ while advancing \tcode{e}'s state as described above. \indexlibrary{\idxcode{discard_block_engine}}% +\indexlibrarymember{result_type}{discard_block_engine}% \begin{codeblock} template class discard_block_engine { @@ -3672,6 +3676,7 @@ \end{codeblock} \indexlibrary{\idxcode{independent_bits_engine}}% +\indexlibrarymember{result_type}{independent_bits_engine}% \begin{codeblock} template class independent_bits_engine { @@ -3771,6 +3776,7 @@ produced while advancing \tcode{e}'s state as described above. \indexlibrary{\idxcode{shuffle_order_engine}}% +\indexlibrarymember{result_type}{shuffle_order_engine}% \begin{codeblock} template class shuffle_order_engine { @@ -4045,6 +4051,7 @@ the implementation may employ a random number engine. \indexlibrary{\idxcode{random_device}}% +\indexlibrarymember{result_type}{random_device}% \begin{codeblock} class random_device { public: @@ -4151,6 +4158,7 @@ \rSec3[rand.util.seedseq]{Class \tcode{seed_seq}}% \indexlibrary{\idxcode{seed_seq}}% +\indexlibrarymember{result_type}{seed_seq}% \begin{codeblock} class seed_seq { public: @@ -4510,6 +4518,7 @@ \[ P(i\,|\,a,b) = 1 / (b - a + 1) \text{ .} \] \indexlibrary{\idxcode{uniform_int_distribution}}% +\indexlibrarymember{result_type}{uniform_int_distribution}% \begin{codeblock} template class uniform_int_distribution { @@ -4596,6 +4605,7 @@ \end{note} \indexlibrary{\idxcode{uniform_real_distribution}}% +\indexlibrarymember{result_type}{uniform_real_distribution}% \begin{codeblock} template class uniform_real_distribution { @@ -4697,6 +4707,7 @@ \] \indexlibrary{\idxcode{bernoulli_distribution}}% +\indexlibrarymember{result_type}{bernoulli_distribution}% \begin{codeblock} class bernoulli_distribution { public: @@ -4767,6 +4778,7 @@ \[ P(i\,|\,t,p) = \binom{t}{i} \cdot p^i \cdot (1-p)^{t-i} \text{ .} \] \indexlibrary{\idxcode{binomial_distribution}}% +\indexlibrarymember{result_type}{binomial_distribution}% \begin{codeblock} template class binomial_distribution { @@ -4848,6 +4860,7 @@ \[ P(i\,|\,p) = p \cdot (1-p)^{i} \text{ .} \] \indexlibrary{\idxcode{geometric_distribution}}% +\indexlibrarymember{result_type}{geometric_distribution}% \begin{codeblock} template class geometric_distribution { @@ -4923,6 +4936,7 @@ \end{note} \indexlibrary{\idxcode{negative_binomial_distribution}}% +\indexlibrarymember{result_type}{negative_binomial_distribution}% \begin{codeblock} template class negative_binomial_distribution { @@ -5024,6 +5038,7 @@ . \indexlibrary{\idxcode{poisson_distribution}}% +\indexlibrarymember{result_type}{poisson_distribution}% \begin{codeblock} template class poisson_distribution @@ -5095,6 +5110,7 @@ \[ p(x\,|\,\lambda) = \lambda e^{-\lambda x} \text{ .} \] \indexlibrary{\idxcode{exponential_distribution}}% +\indexlibrarymember{result_type}{exponential_distribution}% \begin{codeblock} template class exponential_distribution { @@ -5168,6 +5184,7 @@ \text{ .} \] \indexlibrary{\idxcode{gamma_distribution}}% +\indexlibrarymember{result_type}{gamma_distribution}% \begin{codeblock} template class gamma_distribution { @@ -5255,6 +5272,7 @@ \text{ .} \] \indexlibrary{\idxcode{weibull_distribution}}% +\indexlibrarymember{result_type}{weibull_distribution}% \begin{codeblock} template class weibull_distribution { @@ -5347,6 +5365,7 @@ \text{ .} \] \indexlibrary{\idxcode{extreme_value_distribution}}% +\indexlibrarymember{result_type}{extreme_value_distribution}% \begin{codeblock} template class extreme_value_distribution { @@ -5461,6 +5480,7 @@ . \indexlibrary{\idxcode{normal_distribution}}% +\indexlibrarymember{result_type}{normal_distribution}% \begin{codeblock} template class normal_distribution { @@ -5547,6 +5567,7 @@ \text{ .} \] \indexlibrary{\idxcode{lognormal_distribution}}% +\indexlibrarymember{result_type}{lognormal_distribution}% \begin{codeblock} template class lognormal_distribution { @@ -5631,6 +5652,7 @@ \[ p(x\,|\,n) = \frac{x^{(n/2)-1} \cdot e^{-x/2}}{\Gamma(n/2) \cdot 2^{n/2}} \text{ .} \] \indexlibrary{\idxcode{chi_squared_distribution}}% +\indexlibrarymember{result_type}{chi_squared_distribution}% \begin{codeblock} template class chi_squared_distribution { @@ -5703,6 +5725,7 @@ \[ p(x\,|\,a,b) = \left(\pi b \left(1 + \left(\frac{x-a}{b} \right)^2 \, \right)\right)^{-1} \text{ .} \] \indexlibrary{\idxcode{cauchy_distribution}}% +\indexlibrarymember{result_type}{cauchy_distribution}% \begin{codeblock} template class cauchy_distribution { @@ -5791,6 +5814,7 @@ \text{ .} \] \indexlibrary{\idxcode{fisher_f_distribution}}% +\indexlibrarymember{result_type}{fisher_distribution}% \begin{codeblock} template class fisher_f_distribution { @@ -5878,6 +5902,7 @@ \text{ .} \] \indexlibrary{\idxcode{student_t_distribution}}% +\indexlibrarymember{result_type}{student_t_distribution}% \begin{codeblock} template class student_t_distribution { @@ -5976,6 +6001,7 @@ $0 < S = w_0 + \dotsb + w_{n - 1}$. \indexlibrary{\idxcode{discrete_distribution}}% +\indexlibrarymember{result_type}{discrete_distribution}% \begin{codeblock} template class discrete_distribution { @@ -6143,6 +6169,7 @@ $0 < S = w_0 + \dotsb + w_{n-1}$. \indexlibrary{\idxcode{piecewise_constant_distribution}}% +\indexlibrarymember{result_type}{piecewise_constant_distribution}% \begin{codeblock} template class piecewise_constant_distribution { @@ -6357,6 +6384,7 @@ \[ 0 < S = \frac{1}{2} \cdot \sum_{k=0}^{n-1} (w_k + w_{k+1}) \cdot (b_{k+1} - b_k) \text{ .} \] \indexlibrary{\idxcode{piecewise_linear_distribution}}% +\indexlibrarymember{result_type}{piecewise_linear_distribution}% \begin{codeblock} template class piecewise_linear_distribution { diff --git a/source/utilities.tex b/source/utilities.tex index 70d1c66f18..cb55f49a86 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15483,6 +15483,7 @@ \rSec3[func.wrap.func]{Class template \tcode{function}} \indexlibrary{\idxcode{function}}% +\indexlibrarymember{result_type}{function}% \begin{codeblock} namespace std { template class function; // not defined From 221f1062d929688811aaa96c9752b54443ba29db Mon Sep 17 00:00:00 2001 From: Dan Raviv Date: Fri, 23 Aug 2019 10:00:40 +0300 Subject: [PATCH 10/99] [lex.key,diff.header.iso646.h] Consistent tokens order (#3190) Order the alternative tokens in [diff.header.iso646.h] in the same way they are ordered in Table 6 in [lex.key]. --- source/compatibility.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compatibility.tex b/source/compatibility.tex index 69ab2d722c..95db1f4131 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -2462,8 +2462,8 @@ \tcode{bitand}, \tcode{bitor}, \tcode{compl}, -\tcode{not_eq}, \tcode{not}, +\tcode{not_eq}, \tcode{or}, \tcode{or_eq}, \tcode{xor}, From 92f599b75123280d0ef17f00a1717f0ca89a19f8 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 24 Aug 2019 22:20:56 +0200 Subject: [PATCH 11/99] [basic.def] Move rule on template definition here from its original location in [temp] p3. --- source/basic.tex | 5 +++++ source/templates.tex | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index ccda696b31..bc31d070a2 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -178,6 +178,11 @@ \item it is a \grammarterm{using-enum-declaration}\iref{enum.udecl}, \item it is +a \grammarterm{template-declaration}\iref{temp} +whose \grammarterm{template-head} is not followed by +either a \grammarterm{concept-definition} or a \grammarterm{declaration} +that defines a function, a class, a variable, or a static data member. +\item it is an explicit instantiation declaration\iref{temp.explicit}, or \item it is an explicit specialization\iref{temp.expl.spec} whose diff --git a/source/templates.tex b/source/templates.tex index 58e154d43c..29642d2fc9 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -93,14 +93,7 @@ \pnum A \grammarterm{template-declaration} is a \grammarterm{declaration}. -\indextext{template!definition of}% -A \grammarterm{template-declaration} is also a definition -if its -\grammarterm{template-head} is followed by -either a \grammarterm{concept-definition} or -a \grammarterm{declaration} that -defines a function, a class, a variable, or a -static data member. A declaration introduced by a template declaration of a +A declaration introduced by a template declaration of a \indextext{variable template!definition of}% variable is a \defnx{variable template}{template!variable}. A variable template at class scope is a \defnx{static data member template}{template!static data member}. From 5c13e480bdfee18fefe32dcb3fd80c642b353e97 Mon Sep 17 00:00:00 2001 From: morinmorin Date: Tue, 3 Sep 2019 22:47:44 +0900 Subject: [PATCH 12/99] [range.range] replace hyphens with dashes (#3206) --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index 1c03d71922..1e9c9b7929 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -839,7 +839,7 @@ model \tcode{\placeholdernc{forwarding-range}}. \tcode{subrange} provides non-member rvalue overloads of \tcode{begin} and \tcode{end} with the same semantics as its member lvalue overloads, and \tcode{subrange}'s iterators -- since they are ``borrowed'' from some other range - +-- since they are ``borrowed'' from some other range -- do not have validity tied to the lifetime of a \tcode{subrange} object. \end{example} \end{itemdescr} From ee7b223aad941219d583b4a6cbf058abb740d63f Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 3 Sep 2019 14:50:19 +0100 Subject: [PATCH 13/99] [span.syn] Fix inconsistent class key in tuple_size/tuple_element (#3211) --- source/containers.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 24b4216aaf..e82437ea3d 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -10295,8 +10295,8 @@ as_writable_bytes(span s) noexcept; // \ref{span.tuple}, tuple interface - template class tuple_size; - template class tuple_element; + template struct tuple_size; + template struct tuple_element; template struct tuple_size>; template From fad5d71d46953f73d50e4629671dc83022f53d38 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 3 Sep 2019 14:53:56 +0100 Subject: [PATCH 14/99] [span.tuple] Simplify definition of get(span) (#3210) --- source/containers.tex | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index e82437ea3d..1d33725654 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -10984,7 +10984,5 @@ \tcode{Extent != dynamic_extent \&\& I < Extent} is \tcode{true}. \pnum -\returns -A reference to the $\tcode{I}^\text{th}$ element of \tcode{s}, -where indexing is zero-based. +\returns \tcode{s[I]}. \end{itemdescr} From c241ddeeb2fb2d4b9930ecc0fd84f12249953e12 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 3 Sep 2019 14:06:55 -0700 Subject: [PATCH 15/99] [diff.cpp17] Add 'constinit' to one more list of new keywords in C++20. --- source/compatibility.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/compatibility.tex b/source/compatibility.tex index 95db1f4131..4931382899 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -1834,6 +1834,7 @@ \tcode{char8_t}, \tcode{concept}, \tcode{consteval}, +\tcode{constinit}, \tcode{co_await}, \tcode{co_yield}, \tcode{co_return}, or \tcode{requires} as an identifier is not valid in this International Standard. From dc2bff00d051ca0b6c0aa40e33eac13dd89dda9c Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Wed, 11 Sep 2019 12:57:29 +0200 Subject: [PATCH 16/99] [diff] Move markers to lines of their own. (#3221) --- source/compatibility.tex | 630 ++++++++++++++++++++++++++------------- 1 file changed, 420 insertions(+), 210 deletions(-) diff --git a/source/compatibility.tex b/source/compatibility.tex index 4931382899..ab58fc3a6b 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -11,7 +11,8 @@ \rSec2[diff.lex]{\ref{lex}: lexical conventions} \diffref{lex.key} -\change New Keywords\\ +\change +New Keywords\\ New keywords are added to \Cpp{}; see \ref{lex.key}. \rationale @@ -30,7 +31,8 @@ Common. \diffref{lex.ccon} -\change Type of character literal is changed from \tcode{int} to \tcode{char}. +\change +Type of character literal is changed from \tcode{int} to \tcode{char}. \rationale This is needed for improved overloaded function argument type matching. @@ -60,7 +62,8 @@ Programs which depend upon \tcode{sizeof('x')} are probably rare. \diffref{lex.string} -\change String literals made const.\\ +\change +String literals made const.\\ The type of a string literal is changed from ``array of \tcode{char}'' to ``array of \tcode{const char}''. @@ -100,7 +103,8 @@ \rSec2[diff.basic]{\ref{basic}: basics} \diffref{basic.def} -\change \Cpp{} does not have ``tentative definitions'' as in C.\\ +\change +\Cpp{} does not have ``tentative definitions'' as in C.\\ E.g., at file scope, \begin{codeblock} @@ -136,7 +140,8 @@ Seldom. \diffref{basic.scope} -\change A \tcode{struct} is a scope in \Cpp{}, not in C. +\change +A \tcode{struct} is a scope in \Cpp{}, not in C. \rationale Class scope is crucial to \Cpp{}, and a struct is a class. \effect @@ -150,7 +155,8 @@ The latter is probably rare. \diffref{basic.link} [also \ref{dcl.type}] -\change A name of file scope that is explicitly declared \tcode{const}, and not explicitly +\change +A name of file scope that is explicitly declared \tcode{const}, and not explicitly declared \tcode{extern}, has internal linkage, while in C it would have external linkage. \rationale Because const objects may be used as values during translation in @@ -166,7 +172,8 @@ Seldom. \diffref{basic.start.main} -\change The \tcode{main} function cannot be called recursively and cannot have its address taken. +\change +The \tcode{main} function cannot be called recursively and cannot have its address taken. \rationale The \tcode{main} function may require special actions. \effect @@ -178,7 +185,8 @@ Seldom. \diffref{basic.types} -\change C allows ``compatible types'' in several places, \Cpp{} does not.\\ +\change +C allows ``compatible types'' in several places, \Cpp{} does not.\\ For example, otherwise-identical \tcode{struct} types with different tag names are ``compatible'' in C but are distinctly different types @@ -201,7 +209,8 @@ \rSec2[diff.expr]{\ref{expr}: expressions} \diffref{conv.ptr} -\change Converting \tcode{void*} to a pointer-to-object type requires casting. +\change +Converting \tcode{void*} to a pointer-to-object type requires casting. \begin{codeblock} char a[10]; @@ -236,7 +245,8 @@ if the cast is not used. \diffref{expr.call} -\change Implicit declaration of functions is not allowed. +\change +Implicit declaration of functions is not allowed. \rationale The type-safe nature of \Cpp{}. \effect @@ -252,13 +262,16 @@ \diffref{expr.post.incr,expr.pre.incr} \change Decrement operator is not allowed with \tcode{bool} operand. -\rationale Feature with surprising semantics. -\effect A valid ISO C expression utilizing the decrement operator on +\rationale +Feature with surprising semantics. +\effect +A valid ISO C expression utilizing the decrement operator on a \tcode{bool} lvalue (for instance, via the C typedef in \tcode{}) is ill-formed in this International Standard. \diffref{expr.sizeof,expr.cast} -\change Types must be defined in declarations, not in expressions.\\ +\change +Types must be defined in declarations, not in expressions.\\ In C, a sizeof expression or cast expression may define a new type. For example, \begin{codeblock} @@ -279,7 +292,8 @@ \indextext{conversion!lvalue-to-rvalue}% \indextext{rvalue!lvalue conversion to}% \indextext{lvalue}% -\change The result of a conditional expression, an assignment expression, or a comma expression may be an lvalue. +\change +The result of a conditional expression, an assignment expression, or a comma expression may be an lvalue. \rationale \Cpp{} is an object-oriented language, placing relatively more emphasis on lvalues. For example, function calls may @@ -307,7 +321,8 @@ \rSec2[diff.stat]{\ref{stmt.stmt}: statements} \diffref{stmt.switch,stmt.goto} -\change It is now invalid to jump past a declaration with explicit or implicit initializer (except across entire block not entered). +\change +It is now invalid to jump past a declaration with explicit or implicit initializer (except across entire block not entered). \rationale Constructors used in initializers may allocate resources which need to be de-allocated upon leaving the @@ -327,7 +342,8 @@ Seldom. \diffref{stmt.return} -\change It is now invalid to return (explicitly or implicitly) from a function which is +\change +It is now invalid to return (explicitly or implicitly) from a function which is declared to return a value without actually returning a value. \rationale The caller and callee may assume fairly elaborate @@ -353,7 +369,8 @@ \rSec2[diff.dcl]{\ref{dcl.dcl}: declarations} \diffref{dcl.stc} -\change In \Cpp{}, the \tcode{static} or \tcode{extern} specifiers can only be applied to names of objects or functions.\\ +\change +In \Cpp{}, the \tcode{static} or \tcode{extern} specifiers can only be applied to names of objects or functions.\\ Using these specifiers with type declarations is illegal in \Cpp{}. In C, these specifiers are ignored when used on type declarations. @@ -380,7 +397,8 @@ Seldom. \diffref{dcl.stc} -\change In \Cpp{}, \tcode{register} is not a storage class specifier. +\change +In \Cpp{}, \tcode{register} is not a storage class specifier. \rationale The storage class specifier had no effect in \Cpp{}. \effect @@ -391,7 +409,8 @@ Common. \diffref{dcl.typedef} -\change A \Cpp{} typedef name must be different from any class type name declared +\change +A \Cpp{} typedef name must be different from any class type name declared in the same scope (except if the typedef is a synonym of the class name with the same name). In C, a typedef name and a struct tag name declared in the same scope can have the same name (because they have different name spaces). @@ -423,7 +442,8 @@ Seldom. \diffref{dcl.type} [see also \ref{basic.link}] -\change Const objects must be initialized in \Cpp{} but can be left uninitialized in C. +\change +Const objects must be initialized in \Cpp{} but can be left uninitialized in C. \rationale A const object cannot be assigned to so it must be initialized to hold a useful value. @@ -435,7 +455,8 @@ Seldom. \diffref{dcl.type} -\change Banning implicit \tcode{int}. +\change +Banning implicit \tcode{int}. In \Cpp{} a \grammarterm{decl-specifier-seq} @@ -481,15 +502,20 @@ } \end{codeblock} -\rationale Allowing the use of \tcode{auto} to deduce the type +\rationale +Allowing the use of \tcode{auto} to deduce the type of a variable from its initializer results in undesired interpretations of \tcode{auto} as a storage class specifier in certain contexts. -\effect Deletion of semantically well-defined feature. -\difficulty Syntactic transformation. -\howwide Rare. +\effect +Deletion of semantically well-defined feature. +\difficulty +Syntactic transformation. +\howwide +Rare. \diffref{dcl.fct} -\change In \Cpp{}, a function declared with an empty parameter list takes no arguments. +\change +In \Cpp{}, a function declared with an empty parameter list takes no arguments. In C, an empty parameter list means that the number and type of the function arguments are unknown. Example: @@ -516,7 +542,8 @@ Common. \diffref{dcl.fct} [see \ref{expr.sizeof}] -\change In \Cpp{}, types may not be defined in return or parameter types. +\change +In \Cpp{}, types may not be defined in return or parameter types. In C, these type definitions are allowed. Example: @@ -542,7 +569,8 @@ This style of type definition is seen as poor coding style. \diffref{dcl.fct.def} -\change In \Cpp{}, the syntax for function definition excludes the ``old-style'' C function. +\change +In \Cpp{}, the syntax for function definition excludes the ``old-style'' C function. In C, ``old-style'' syntax is allowed, but deprecated as ``obsolescent''. \rationale Prototypes are essential to type safety. @@ -591,7 +619,8 @@ The other features are seldom used. \diffref{dcl.init.string} -\change In \Cpp{}, when initializing an array of character with a string, the number of +\change +In \Cpp{}, when initializing an array of character with a string, the number of characters in the string (including the terminating \tcode{'\textbackslash 0'}) must not exceed the number of elements in the array. In C, an array can be initialized with a string even if the array is not large enough to contain the string-terminating \tcode{'\textbackslash 0'}. @@ -615,7 +644,8 @@ This style of array initialization is seen as poor coding style. \diffref{dcl.enum} -\change \Cpp{} objects of enumeration type can only be assigned values of the same enumeration type. +\change +\Cpp{} objects of enumeration type can only be assigned values of the same enumeration type. In C, objects of enumeration type can be assigned values of any integral type. Example: @@ -636,7 +666,8 @@ Common. \diffref{dcl.enum} -\change In \Cpp{}, the type of an enumerator is its enumeration. In C, the type of an enumerator is \tcode{int}. +\change +In \Cpp{}, the type of an enumerator is its enumeration. In C, the type of an enumerator is \tcode{int}. Example: @@ -663,7 +694,8 @@ \rSec2[diff.class]{\ref{class}: classes} \diffref{class.name} [see also \ref{dcl.typedef}] -\change In \Cpp{}, a class declaration introduces the class name into the scope where it is +\change +In \Cpp{}, a class declaration introduces the class name into the scope where it is declared and hides any object, function or other declaration of that name in an enclosing scope. In C, an inner scope declaration of a struct tag name never hides the name of an object or function in an outer scope. @@ -702,7 +734,8 @@ Seldom. \diffref{class.copy.ctor} -\change Copying volatile objects. +\change +Copying volatile objects. The implicitly-declared copy constructor and implicitly-declared copy assignment operator @@ -764,7 +797,8 @@ Seldom. \diffref{class.nest} -\change In \Cpp{}, the name of a nested class is local to its enclosing class. In C +\change +In \Cpp{}, the name of a nested class is local to its enclosing class. In C the name of the nested class belongs to the same scope as the name of the outermost enclosing class. Example: @@ -810,7 +844,8 @@ Seldom. \diffref{class.nested.type} -\change In \Cpp{}, a typedef name may not be redeclared in a class definition after being used in that definition. +\change +In \Cpp{}, a typedef name may not be redeclared in a class definition after being used in that definition. Example: @@ -836,7 +871,8 @@ \rSec2[diff.cpp]{\ref{cpp}: preprocessing directives} \diffref{cpp.predefined} -\change Whether \mname{STDC} is defined and if so, what its value is, are +\change +Whether \mname{STDC} is defined and if so, what its value is, are \impldef{definition and meaning of \mname{STDC}}. \rationale \Cpp{} is not identical to ISO C\@. @@ -863,8 +899,10 @@ \rSec2[diff.cpp03.lex]{\ref{lex}: lexical conventions} \diffref{lex.pptoken} -\change New kinds of string literals. -\rationale Required for new features. +\change +New kinds of string literals. +\rationale +Required for new features. \effect Valid \CppIII{} code may fail to compile or produce different results in this International Standard. Specifically, macros named \tcode{R}, \tcode{u8}, @@ -878,8 +916,10 @@ \end{codeblock} \diffref{lex.pptoken} -\change User-defined literal string support. -\rationale Required for new features. +\change +User-defined literal string support. +\rationale +Required for new features. \effect Valid \CppIII{} code may fail to compile or produce different results in this International Standard. @@ -895,8 +935,10 @@ \#1 consists of a single preprocessing token, so the macro is not expanded. \diffref{lex.key} -\change New keywords. -\rationale Required for new features. +\change +New keywords. +\rationale +Required for new features. \effect Added to \tref{lex.key}, the following identifiers are new keywords: \tcode{alignas}, @@ -914,8 +956,10 @@ Standard. \diffref{lex.icon} -\change Type of integer literals. -\rationale C99 compatibility. +\change +Type of integer literals. +\rationale +C99 compatibility. \effect Certain integer literals larger than can be represented by \tcode{long} could change from an unsigned integer type to \tcode{signed long long}. @@ -923,10 +967,13 @@ \rSec2[diff.cpp03.expr]{\ref{expr}: expressions} \diffref{conv.ptr} -\change Only literals are integer null pointer constants. -\rationale Removing surprising interactions with templates and constant +\change +Only literals are integer null pointer constants. +\rationale +Removing surprising interactions with templates and constant expressions. -\effect Valid \CppIII{} code may fail to compile or produce different results in +\effect +Valid \CppIII{} code may fail to compile or produce different results in this International Standard. For example: @@ -939,16 +986,20 @@ \end{codeblock} \diffref{expr.mul} -\change Specify rounding for results of integer \tcode{/} and \tcode{\%}. -\rationale Increase portability, C99 compatibility. +\change +Specify rounding for results of integer \tcode{/} and \tcode{\%}. +\rationale +Increase portability, C99 compatibility. \effect Valid \CppIII{} code that uses integer division rounds the result toward 0 or toward negative infinity, whereas this International Standard always rounds the result toward 0. \diffref{expr.log.and} -\change \tcode{\&\&} is valid in a \grammarterm{type-name}. -\rationale Required for new features. +\change +\tcode{\&\&} is valid in a \grammarterm{type-name}. +\rationale +Required for new features. \effect Valid \CppIII{} code may fail to compile or produce different results in this International Standard. @@ -963,8 +1014,10 @@ \rSec2[diff.cpp03.dcl.dcl]{\ref{dcl.dcl}: declarations} \diffref{dcl.spec} -\change Remove \tcode{auto} as a storage class specifier. -\rationale New feature. +\change +Remove \tcode{auto} as a storage class specifier. +\rationale +New feature. \effect Valid \CppIII{} code that uses the keyword \tcode{auto} as a storage class specifier may be invalid in this International Standard. In this International @@ -972,8 +1025,10 @@ from its initializer expression. \diffref{dcl.init.list} -\change Narrowing restrictions in aggregate initializers. -\rationale Catches bugs. +\change +Narrowing restrictions in aggregate initializers. +\rationale +Catches bugs. \effect Valid \CppIII{} code may fail to compile in this International Standard. For example, the following code is valid in \CppIII{} but invalid in this @@ -987,17 +1042,21 @@ \rSec2[diff.cpp03.class]{\ref{class}: classes} \diffref{class.default.ctor,class.dtor,class.copy.ctor,class.copy.assign} -\change Implicitly-declared special member functions are defined as deleted +\change +Implicitly-declared special member functions are defined as deleted when the implicit definition would have been ill-formed. -\rationale Improves template argument deduction failure. +\rationale +Improves template argument deduction failure. \effect A valid \CppIII{} program that uses one of these special member functions in a context where the definition is not required (e.g., in an expression that is not potentially evaluated) becomes ill-formed. \diffref{class.dtor} -\change User-declared destructors have an implicit exception specification. -\rationale Clarification of destructor requirements. +\change +User-declared destructors have an implicit exception specification. +\rationale +Clarification of destructor requirements. \effect Valid \CppIII{} code may execute differently in this International Standard. In particular, destructors that throw exceptions will call \tcode{std::terminate} @@ -1007,16 +1066,20 @@ \rSec2[diff.cpp03.temp]{\ref{temp}: templates} \diffref{temp.param} -\change Remove \tcode{export}. -\rationale No implementation consensus. +\change +Remove \tcode{export}. +\rationale +No implementation consensus. \effect A valid \CppIII{} declaration containing \tcode{export} is ill-formed in this International Standard. \diffref{temp.arg} -\change Remove whitespace requirement for nested closing template right angle +\change +Remove whitespace requirement for nested closing template right angle brackets. -\rationale Considered a persistent but minor annoyance. Template aliases +\rationale +Considered a persistent but minor annoyance. Template aliases representing non-class types would exacerbate whitespace issues. \effect Change to semantics of well-defined expression. A valid \CppIII{} expression @@ -1033,17 +1096,22 @@ \end{codeblock} \diffref{temp.dep.candidate} -\change Allow dependent calls of functions with internal linkage. -\rationale Overly constrained, simplify overload resolution rules. +\change +Allow dependent calls of functions with internal linkage. +\rationale +Overly constrained, simplify overload resolution rules. \effect A valid \CppIII{} program could get a different result than this International Standard. \rSec2[diff.cpp03.library]{\ref{library}: library introduction} -\pnum\textbf{Affected:} \ref{library} -- \ref{\lastlibchapter} -\change New reserved identifiers. -\rationale Required by new features. +\pnum +\textbf{Affected:} \ref{library} -- \ref{\lastlibchapter} +\change +New reserved identifiers. +\rationale +Required by new features. \effect Valid \CppIII{} code that uses any identifiers added to the \Cpp{} standard library by this International Standard may fail to compile or produce different @@ -1052,8 +1120,10 @@ International Standard. \diffref{headers} -\change New headers. -\rationale New functionality. +\change +New headers. +\rationale +New functionality. \effect The following \Cpp{} headers are new: \tcode{}, @@ -1087,22 +1157,29 @@ invalid in this International Standard. \diffref{swappable.requirements} -\effect Function \tcode{swap} moved to a different header -\rationale Remove dependency on \tcode{} for \tcode{swap}. -\effect Valid \CppIII{} code that has been compiled expecting swap to be in +\effect +Function \tcode{swap} moved to a different header +\rationale +Remove dependency on \tcode{} for \tcode{swap}. +\effect +Valid \CppIII{} code that has been compiled expecting swap to be in \tcode{} may have to instead include \tcode{}. \diffref{namespace.posix} -\change New reserved namespace. -\rationale New functionality. +\change +New reserved namespace. +\rationale +New functionality. \effect The global namespace \tcode{posix} is now reserved for standardization. Valid \CppIII{} code that uses a top-level namespace \tcode{posix} may be invalid in this International Standard. \diffref{res.on.macro.definitions} -\change Additional restrictions on macro names. -\rationale Avoid hard to diagnose or non-portable constructs. +\change +Additional restrictions on macro names. +\rationale +Avoid hard to diagnose or non-portable constructs. \effect Names of attribute identifiers may not be used as macro names. Valid \CppIII{} code that defines \tcode{override}, \tcode{final}, @@ -1113,9 +1190,11 @@ language support library} \diffref{new.delete.single} -\change \tcode{operator new} may throw exceptions other than +\change +\tcode{operator new} may throw exceptions other than \tcode{std::bad_alloc}. -\rationale Consistent application of \tcode{noexcept}. +\rationale +Consistent application of \tcode{noexcept}. \effect Valid \CppIII{} code that assumes that global \tcode{operator new} only throws \tcode{std::bad_alloc} may execute differently in this International @@ -1128,26 +1207,33 @@ \rSec2[diff.cpp03.diagnostics]{\ref{diagnostics}: diagnostics library} \diffref{errno} -\change Thread-local error numbers. -\rationale Support for new thread facilities. -\effect Valid but implementation-specific \CppIII{} code that relies on +\change +Thread-local error numbers. +\rationale +Support for new thread facilities. +\effect +Valid but implementation-specific \CppIII{} code that relies on \tcode{errno} being the same across threads may change behavior in this International Standard. \rSec2[diff.cpp03.utilities]{\ref{utilities}: general utilities library} \diffref{util.dynamic.safety} -\change Minimal support for garbage-collected regions. -\rationale Required by new feature. +\change +Minimal support for garbage-collected regions. +\rationale +Required by new feature. \effect Valid \CppIII{} code, compiled without traceable pointer support, that interacts with newer \Cpp{} code using regions declared reachable may have different runtime behavior. \diffref{refwrap,arithmetic.operations,comparisons,logical.operations,bitwise.operations} -\change Standard function object types no longer derived from +\change +Standard function object types no longer derived from \tcode{std::unary_function} or \tcode{std::binary_function}. -\rationale Superseded by new feature; \tcode{unary_function} and +\rationale +Superseded by new feature; \tcode{unary_function} and \tcode{binary_function} are no longer defined. \effect Valid \CppIII{} code that depends on function object types being derived from @@ -1157,16 +1243,20 @@ \rSec2[diff.cpp03.strings]{\ref{strings}: strings library} \diffref{string.classes} -\change \tcode{basic_string} requirements no longer allow reference-counted +\change +\tcode{basic_string} requirements no longer allow reference-counted strings. -\rationale Invalidation is subtly different with reference-counted strings. +\rationale +Invalidation is subtly different with reference-counted strings. This change regularizes behavior for this International Standard. \effect Valid \CppIII{} code may execute differently in this International Standard. \diffref{string.require} -\change Loosen \tcode{basic_string} invalidation rules. -\rationale Allow small-string optimization. +\change +Loosen \tcode{basic_string} invalidation rules. +\rationale +Allow small-string optimization. \effect Valid \CppIII{} code may execute differently in this International Standard. Some \tcode{const} member functions, such as \tcode{data} and \tcode{c_str}, @@ -1175,8 +1265,10 @@ \rSec2[diff.cpp03.containers]{\ref{containers}: containers library} \diffref{container.requirements} -\change Complexity of \tcode{size()} member functions now constant. -\rationale Lack of specification of complexity of \tcode{size()} resulted in +\change +Complexity of \tcode{size()} member functions now constant. +\rationale +Lack of specification of complexity of \tcode{size()} resulted in divergent implementations with inconsistent performance characteristics. \effect Some container implementations that conform to \CppIII{} may not conform to the @@ -1185,8 +1277,10 @@ incompatible changes. \diffref{container.requirements} -\change Requirements change: relaxation. -\rationale Clarification. +\change +Requirements change: relaxation. +\rationale +Clarification. \effect Valid \CppIII{} code that attempts to meet the specified container requirements may now be over-specified. Code that attempted to be portable across containers @@ -1199,15 +1293,19 @@ \end{itemize} \diffref{container.requirements} -\change Requirements change: default constructible. -\rationale Clarification of container requirements. +\change +Requirements change: default constructible. +\rationale +Clarification of container requirements. \effect Valid \CppIII{} code that attempts to explicitly instantiate a container using a user-defined type with no default constructor may fail to compile. \diffref{sequence.reqmts,associative.reqmts} -\change Signature changes: from \tcode{void} return types. -\rationale Old signature threw away useful information that may be expensive +\change +Signature changes: from \tcode{void} return types. +\rationale +Old signature threw away useful information that may be expensive to recalculate. \effect The following member functions have changed: @@ -1223,9 +1321,11 @@ of these functions) will fail to compile with this International Standard. \diffref{sequence.reqmts,associative.reqmts} -\change Signature changes: from \tcode{iterator} to \tcode{const_iterator} +\change +Signature changes: from \tcode{iterator} to \tcode{const_iterator} parameters. -\rationale Overspecification. +\rationale +Overspecification. \effect The signatures of the following member functions changed from taking an \tcode{iterator} to taking a \tcode{const_iterator}: @@ -1244,8 +1344,10 @@ International Standard. \diffref{sequence.reqmts,associative.reqmts} -\change Signature changes: \tcode{resize}. -\rationale Performance, compatibility with move semantics. +\change +Signature changes: \tcode{resize}. +\rationale +Performance, compatibility with move semantics. \effect For \tcode{vector}, \tcode{deque}, and \tcode{list} the fill value passed to \tcode{resize} is now passed by reference instead of @@ -1256,8 +1358,10 @@ \rSec2[diff.cpp03.algorithms]{\ref{algorithms}: algorithms library} \diffref{algorithms.general} -\change Result state of inputs after application of some algorithms. -\rationale Required by new feature. +\change +Result state of inputs after application of some algorithms. +\rationale +Required by new feature. \effect A valid \CppIII{} program may detect that an object with a valid but unspecified state has a different valid but unspecified state with this @@ -1268,8 +1372,10 @@ \rSec2[diff.cpp03.numerics]{\ref{numerics}: numerics library} \diffref{complex.numbers} -\change Specified representation of complex numbers. -\rationale Compatibility with C99. +\change +Specified representation of complex numbers. +\rationale +Compatibility with C99. \effect Valid \CppIII{} code that uses implementation-specific knowledge about the binary representation of the required template specializations of @@ -1278,8 +1384,10 @@ \rSec2[diff.cpp03.input.output]{\ref{input.output}: input/output library} \diffref{istream.sentry,ostream.sentry,iostate.flags} -\change Specify use of \tcode{explicit} in existing boolean conversion functions. -\rationale Clarify intentions, avoid workarounds. +\change +Specify use of \tcode{explicit} in existing boolean conversion functions. +\rationale +Clarify intentions, avoid workarounds. \effect Valid \CppIII{} code that relies on implicit boolean conversions will fail to compile with this International Standard. Such conversions occur in the @@ -1294,8 +1402,10 @@ \end{itemize} \diffref{ios.failure} -\change Change base class of \tcode{std::ios_base::failure}. -\rationale More detailed error messages. +\change +Change base class of \tcode{std::ios_base::failure}. +\rationale +More detailed error messages. \effect \tcode{std::ios_base::failure} is no longer derived directly from \tcode{std::exception}, but is now derived from \tcode{std::system_error}, @@ -1304,9 +1414,11 @@ \tcode{std::exception} may execute differently in this International Standard. \diffref{ios.base} -\change Flag types in \tcode{std::ios_base} are now bitmasks with values +\change +Flag types in \tcode{std::ios_base} are now bitmasks with values defined as constexpr static members. -\rationale Required for new features. +\rationale +Required for new features. \effect Valid \CppIII{} code that relies on \tcode{std::ios_base} flag types being represented as \tcode{std::bitset} or as an integer type may fail to compile @@ -1332,9 +1444,12 @@ \rSec2[diff.cpp11.lex]{\ref{lex}: lexical conventions} \diffref{lex.ppnumber} -\change \grammarterm{pp-number} can contain one or more single quotes. -\rationale Necessary to enable single quotes as digit separators. -\effect Valid \CppXI{} code may fail to compile or may change meaning in this +\change +\grammarterm{pp-number} can contain one or more single quotes. +\rationale +Necessary to enable single quotes as digit separators. +\effect +Valid \CppXI{} code may fail to compile or may change meaning in this International Standard. For example, the following code is valid both in \CppXI{} and in this International Standard, but the macro invocation produces different outcomes because the single quotes delimit a character literal in \CppXI{}, whereas they are digit @@ -1350,9 +1465,12 @@ \rSec2[diff.cpp11.basic]{\ref{basic}: basics} \diffref{basic.stc.dynamic.deallocation} -\change New usual (non-placement) deallocator. -\rationale Required for sized deallocation. -\effect Valid \CppXI{} code could declare a global placement allocation function and +\change +New usual (non-placement) deallocator. +\rationale +Required for sized deallocation. +\effect +Valid \CppXI{} code could declare a global placement allocation function and deallocation function as follows: \begin{codeblock} @@ -1369,13 +1487,16 @@ \rSec2[diff.cpp11.expr]{\ref{expr}: expressions} \diffref{expr.cond} -\change A conditional expression with a throw expression as its second or third +\change +A conditional expression with a throw expression as its second or third operand keeps the type and value category of the other operand. -\rationale Formerly mandated conversions (lvalue-to-rvalue\iref{conv.lval}, +\rationale +Formerly mandated conversions (lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array}, and function-to-pointer\iref{conv.func} standard conversions), especially the creation of the temporary due to lvalue-to-rvalue conversion, were considered gratuitous and surprising. -\effect Valid \CppXI{} code that relies on the conversions may behave differently +\effect +Valid \CppXI{} code that relies on the conversions may behave differently in this International Standard: \begin{codeblock} @@ -1403,9 +1524,11 @@ \rSec2[diff.cpp11.dcl.dcl]{\ref{dcl.dcl}: declarations} \diffref{dcl.constexpr} -\change \tcode{constexpr} non-static member functions are not implicitly +\change +\tcode{constexpr} non-static member functions are not implicitly \tcode{const} member functions. -\rationale Necessary to allow \tcode{constexpr} member functions to mutate +\rationale +Necessary to allow \tcode{constexpr} member functions to mutate the object. \effect Valid \CppXI{} code may fail to compile in this International Standard. @@ -1421,8 +1544,10 @@ \end{codeblock} \diffref{dcl.init.aggr} -\change Classes with default member initializers can be aggregates. -\rationale Necessary to allow default member initializers to be used +\change +Classes with default member initializers can be aggregates. +\rationale +Necessary to allow default member initializers to be used by aggregate initialization. \effect Valid \CppXI{} code may fail to compile or may change meaning in this International Standard. @@ -1443,8 +1568,10 @@ \rSec2[diff.cpp11.library]{\ref{library}: library introduction} \diffref{headers} -\change New header. -\rationale New functionality. +\change +New header. +\rationale +New functionality. \effect The \Cpp{} header \tcode{} is new. Valid \CppXI{} code that \tcode{\#include}{s} a header with that name may be @@ -1453,8 +1580,10 @@ \rSec2[diff.cpp11.input.output]{\ref{input.output}: input/output library} \diffref{c.files} -\change \tcode{gets} is not defined. -\rationale Use of \tcode{gets} is considered dangerous. +\change +\tcode{gets} is not defined. +\rationale +Use of \tcode{gets} is considered dangerous. \effect Valid \CppXI{} code that uses the \tcode{gets} function may fail to compile in this International Standard. @@ -1471,8 +1600,10 @@ \diffref{lex.phases} \indextext{trigraph sequence}% -\change Removal of trigraph support as a required feature. -\rationale Prevents accidental uses of trigraphs in non-raw string literals and comments. +\change +Removal of trigraph support as a required feature. +\rationale +Prevents accidental uses of trigraphs in non-raw string literals and comments. \effect Valid \CppXIV{} code that uses trigraphs may not be valid or may have different semantics in this International Standard. Implementations may choose to @@ -1482,9 +1613,11 @@ the basic source character set. \diffref{lex.ppnumber} -\change \grammarterm{pp-number} can contain \tcode{p} \grammarterm{sign} and +\change +\grammarterm{pp-number} can contain \tcode{p} \grammarterm{sign} and \tcode{P} \grammarterm{sign}. -\rationale Necessary to enable hexadecimal floating literals. +\rationale +Necessary to enable hexadecimal floating literals. \effect Valid \CppXIV{} code may fail to compile or produce different results in this International Standard. Specifically, character sequences like \tcode{0p+0} @@ -1502,16 +1635,21 @@ \diffref{expr.post.incr,expr.pre.incr} \change Remove increment operator with \tcode{bool} operand. -\rationale Obsolete feature with occasionally surprising semantics. -\effect A valid \CppXIV{} expression utilizing the increment operator on +\rationale +Obsolete feature with occasionally surprising semantics. +\effect +A valid \CppXIV{} expression utilizing the increment operator on a \tcode{bool} lvalue is ill-formed in this International Standard. Note that this might occur when the lvalue has a type given by a template parameter. \diffref{expr.new,expr.delete} -\change Dynamic allocation mechanism for over-aligned types. -\rationale Simplify use of over-aligned types. -\effect In \CppXIV{} code that uses a \grammarterm{new-expression} +\change +Dynamic allocation mechanism for over-aligned types. +\rationale +Simplify use of over-aligned types. +\effect +In \CppXIV{} code that uses a \grammarterm{new-expression} to allocate an object with an over-aligned class type, where that class has no allocation functions of its own, \tcode{::operator new(std::size_t)} @@ -1524,16 +1662,20 @@ \diffref{dcl.stc} \indextext{\idxcode{register} storage class}% -\change Removal of \tcode{register} \grammarterm{storage-class-specifier}. -\rationale Enable repurposing of deprecated keyword in future revisions of this International Standard. +\change +Removal of \tcode{register} \grammarterm{storage-class-specifier}. +\rationale +Enable repurposing of deprecated keyword in future revisions of this International Standard. \effect A valid \CppXIV{} declaration utilizing the \tcode{register} \grammarterm{storage-class-specifier} is ill-formed in this International Standard. The specifier can simply be removed to retain the original meaning. \diffref{dcl.spec.auto} -\change \tcode{auto} deduction from \grammarterm{braced-init-list}. -\rationale More intuitive deduction behavior. +\change +\tcode{auto} deduction from \grammarterm{braced-init-list}. +\rationale +More intuitive deduction behavior. \effect Valid \CppXIV{} code may fail to compile or may change meaning in this International Standard. For example: @@ -1543,8 +1685,10 @@ \end{codeblock} \diffref{dcl.fct} -\change Make exception specifications be part of the type system. -\rationale Improve type-safety. +\change +Make exception specifications be part of the type system. +\rationale +Improve type-safety. \effect Valid \CppXIV{} code may fail to compile or change meaning in this International Standard. @@ -1558,9 +1702,11 @@ \end{codeblock} \diffref{dcl.init.aggr} -\change Definition of an aggregate is extended +\change +Definition of an aggregate is extended to apply to user-defined types with base classes. -\rationale To increase convenience of aggregate initialization. +\rationale +To increase convenience of aggregate initialization. \effect Valid \CppXIV{} code may fail to compile or produce different results in this International Standard; initialization from an empty initializer list will @@ -1610,12 +1756,15 @@ \rSec2[diff.cpp14.temp]{\ref{temp}: templates} \diffref{temp.deduct.type} -\change Allowance to deduce from the type of a non-type template argument. -\rationale In combination with the ability to declare +\change +Allowance to deduce from the type of a non-type template argument. +\rationale +In combination with the ability to declare non-type template arguments with placeholder types, allows partial specializations to decompose from the type deduced for the non-type template argument. -\effect Valid \CppXIV{} code may fail to compile +\effect +Valid \CppXIV{} code may fail to compile or produce different results in this International Standard. For example: \begin{codeblock} @@ -1630,8 +1779,10 @@ \rSec2[diff.cpp14.except]{\ref{except}: exception handling} \diffref{except.spec} -\change Remove dynamic exception specifications. -\rationale Dynamic exception specifications were a deprecated feature +\change +Remove dynamic exception specifications. +\rationale +Dynamic exception specifications were a deprecated feature that was complex and brittle in use. They interacted badly with the type system, which became a more significant issue in this International Standard @@ -1651,8 +1802,10 @@ \rSec2[diff.cpp14.library]{\ref{library}: library introduction} \diffref{headers} -\change New headers. -\rationale New functionality. +\change +New headers. +\rationale +New functionality. \effect The following \Cpp{} headers are new: \tcode{}, @@ -1668,8 +1821,10 @@ invalid in this International Standard. \diffref{namespace.future} -\change New reserved namespaces. -\rationale Reserve namespaces for future revisions of the standard library +\change +New reserved namespaces. +\rationale +Reserve namespaces for future revisions of the standard library that might otherwise be incompatible with existing programs. \effect The global namespaces \tcode{std} @@ -1681,8 +1836,10 @@ \rSec2[diff.cpp14.utilities]{\ref{utilities}: general utilities library} \diffref{func.wrap} -\change Constructors taking allocators removed. -\rationale No implementation consensus. +\change +Constructors taking allocators removed. +\rationale +No implementation consensus. \effect Valid \CppXIV{} code may fail to compile or may change meaning in this International Standard. Specifically, constructing a \tcode{std::function} with @@ -1690,8 +1847,10 @@ allocator to \tcode{std::function} constructors in this International Standard. \diffref{util.smartptr.shared} -\change Different constraint on conversions from \tcode{unique_ptr}. -\rationale Adding array support to \tcode{shared_ptr}, +\change +Different constraint on conversions from \tcode{unique_ptr}. +\rationale +Adding array support to \tcode{shared_ptr}, via the syntax \tcode{shared_ptr} and \tcode{shared_ptr}. \effect Valid \CppXIV{} code may fail to compile or may change meaning in this @@ -1707,8 +1866,10 @@ \rSec2[diff.cpp14.string]{\ref{strings}: strings library} \diffref{basic.string} -\change Non-const \tcode{.data()} member added. -\rationale The lack of a non-const \tcode{.data()} +\change +Non-const \tcode{.data()} member added. +\rationale +The lack of a non-const \tcode{.data()} differed from the similar member of \tcode{std::vector}. This change regularizes behavior for this International Standard. \effect @@ -1728,8 +1889,10 @@ \rSec2[diff.cpp14.containers]{\ref{containers}: containers library} \diffref{associative.reqmts} -\change Requirements change: -\rationale Increase portability, clarification of associative container requirements. +\change +Requirements change: +\rationale +Increase portability, clarification of associative container requirements. \effect Valid \CppXIV{} code that attempts to use associative containers having a comparison object with non-const function call operator @@ -1769,16 +1932,20 @@ \tcode{bind1st}, and \tcode{bind2nd} are not defined. -\rationale Superseded by new features. -\effect Valid \CppXIV{} code that uses these class templates +\rationale +Superseded by new features. +\effect +Valid \CppXIV{} code that uses these class templates and function templates may fail to compile in this International Standard. \nodiffref \change Remove old iostreams members [depr.ios.members]. -\rationale Redundant feature for compatibility with pre-standard code +\rationale +Redundant feature for compatibility with pre-standard code has served its time. -\effect A valid \CppXIV{} program using these identifiers +\effect +A valid \CppXIV{} program using these identifiers may be ill-formed in this International Standard. \rSec1[diff.cpp17]{\Cpp{} and ISO \CppXVII{}} @@ -1792,9 +1959,12 @@ \rSec2[diff.cpp17.lex]{\ref{lex}: lexical conventions} \diffref{lex.header} -\change \grammarterm{header-name} tokens are formed in more contexts. -\rationale Required for new features. -\effect When the identifier \tcode{import} +\change +\grammarterm{header-name} tokens are formed in more contexts. +\rationale +Required for new features. +\effect +When the identifier \tcode{import} is followed by a \tcode{<} character, a \grammarterm{header-name} token may be formed. \begin{example} @@ -1806,8 +1976,10 @@ \end{example} \diffref{lex.key} -\change New keywords. -\rationale Required for new features. +\change +New keywords. +\rationale +Required for new features. \begin{itemize} \item The \tcode{char8_t} keyword is added to differentiate @@ -1840,9 +2012,12 @@ as an identifier is not valid in this International Standard. \diffref{lex.operators} -\change New operator \tcode{<=>}. -\rationale Necessary for new functionality. -\effect Valid \CppXVII{} code that contains a \tcode{<=} token +\change +New operator \tcode{<=>}. +\rationale +Necessary for new functionality. +\effect +Valid \CppXVII{} code that contains a \tcode{<=} token immediately followed by a \tcode{>} token may be ill-formed or have different semantics in this International Standard: \begin{codeblock} @@ -1855,11 +2030,14 @@ \end{codeblock} \diffref{lex.literal} -\change Type of UTF-8 string and character literals. -\rationale Required for new features. +\change +Type of UTF-8 string and character literals. +\rationale +Required for new features. The changed types enable function overloading, template specialization, and type deduction to distinguish ordinary and UTF-8 string and character literals. -\effect Valid ISO \CppXVII{} code that depends on +\effect +Valid ISO \CppXVII{} code that depends on UTF-8 string literals having type ``array of \tcode{const char}'' and UTF-8 character literals having type ``char'' is not valid in this International Standard. @@ -1885,9 +2063,12 @@ \rSec2[diff.cpp17.basic]{\ref{basic}: basics} \diffref{basic.link,module.unit,module.import} -\change New identifiers with special meaning. -\rationale Required for new features. -\effect Top-level declarations beginning with +\change +New identifiers with special meaning. +\rationale +Required for new features. +\effect +Top-level declarations beginning with \tcode{module} or \tcode{import} may be either ill-formed or interpreted differently in this International Standard. @@ -1904,10 +2085,13 @@ \end{example} \diffref{intro.races} -\change Except for the initial release operation, +\change +Except for the initial release operation, a release sequence consists solely of atomic read-modify-write operations. -\rationale Removal of rarely used and confusing feature. -\effect If a \tcode{memory_order_release} atomic store is followed +\rationale +Removal of rarely used and confusing feature. +\effect +If a \tcode{memory_order_release} atomic store is followed by a \tcode{memory_order_relaxed} store to the same variable by the same thread, then reading the latter value with a \tcode{memory_order_acquire} load no longer provides any ``happens before'' guarantees, @@ -1916,9 +2100,12 @@ \rSec2[diff.cpp17.expr]{\ref{expr}: expressions} \diffref{expr.prim.lambda.capture} -\change Implicit lambda capture may capture additional entities. -\rationale Rule simplification, necessary to resolve interactions with constexpr if. -\effect Lambdas with a \grammarterm{capture-default} +\change +Implicit lambda capture may capture additional entities. +\rationale +Rule simplification, necessary to resolve interactions with constexpr if. +\effect +Lambdas with a \grammarterm{capture-default} may capture local entities that were not captured in \CppXVII{} if those entities are only referenced in contexts @@ -1927,10 +2114,13 @@ \rSec2[diff.cpp17.dcl.dcl]{\ref{dcl.dcl}: declarations} \diffref{dcl.typedef} -\change Unnamed classes with a typedef name for linkage purposes +\change +Unnamed classes with a typedef name for linkage purposes can contain only C-compatible constructs. -\rationale Necessary for implementability. -\effect Valid C++ 2017 code may be ill-formed in this International Standard. +\rationale +Necessary for implementability. +\effect +Valid C++ 2017 code may be ill-formed in this International Standard. \begin{codeblock} typedef struct { void f() {} // ill-formed; previously well-formed @@ -1938,10 +2128,13 @@ \end{codeblock} \diffref{dcl.fct.default} -\change A function cannot have different default arguments +\change +A function cannot have different default arguments in different translation units. -\rationale Required for modules support. -\effect Valid C++ 2017 code may be ill-formed in this International Standard, +\rationale +Required for modules support. +\effect +Valid C++ 2017 code may be ill-formed in this International Standard, with no diagnostic required. \begin{codeblock} // Translation unit 1 @@ -1955,10 +2148,13 @@ \end{codeblock} \diffref{dcl.init.aggr} -\change A class that has user-declared constructors is never an aggregate. -\rationale Remove potentially error-prone aggregate initialization +\change +A class that has user-declared constructors is never an aggregate. +\rationale +Remove potentially error-prone aggregate initialization which may apply notwithstanding the declared constructors of a class. -\effect Valid \CppXVII{} code that aggregate-initializes +\effect +Valid \CppXVII{} code that aggregate-initializes a type with a user-declared constructor may be ill-formed or have different semantics in this International Standard. @@ -2146,7 +2342,8 @@ \rSec2[diff.cpp17.except]{\ref{except}: exception handling} \diffref{except.spec} -\change Remove \tcode{throw()} exception specification. +\change +Remove \tcode{throw()} exception specification. \rationale Removal of obsolete feature that has been replaced by \tcode{noexcept}. \effect @@ -2166,8 +2363,10 @@ \rSec2[diff.cpp17.library]{\ref{library}: library introduction} \diffref{headers} -\change New headers. -\rationale New functionality. +\change +New headers. +\rationale +New functionality. \effect The following \Cpp{} headers are new: \tcode{}, @@ -2190,7 +2389,8 @@ invalid in this International Standard. \diffref{headers} -\change Remove vacuous \Cpp{} header files. +\change +Remove vacuous \Cpp{} header files. \rationale The empty headers implied a false requirement to achieve C compatibility with the \Cpp{} headers. \effect @@ -2224,7 +2424,8 @@ \change Return types of \tcode{remove}, \tcode{remove_if}, and \tcode{unique} changed from \tcode{void} to \tcode{container::size_type}. -\rationale Improve efficiency and convenience of finding number of removed elements. +\rationale +Improve efficiency and convenience of finding number of removed elements. \effect Code that depends on the return types might have different semantics in this International Standard. Translation units compiled against this version of \Cpp{} may be incompatible with @@ -2236,7 +2437,8 @@ \change The number and order of deducible template parameters for algorithm declarations is now unspecified, instead of being as-declared. -\rationale Increase implementor freedom and allow some function templates +\rationale +Increase implementor freedom and allow some function templates to be implemented as function objects with templated call operators. \effect A valid \CppXVII{} program that passes explicit template arguments to @@ -2248,7 +2450,8 @@ \diffref{istream.extractors} \change Character array extraction only takes array types. -\rationale Increase safety via preventing buffer overflow at compile time. +\rationale +Increase safety via preventing buffer overflow at compile time. \effect Valid \CppXVII{} code may fail to compile in this International Standard: \begin{codeblock} @@ -2311,7 +2514,8 @@ \rSec2[diff.cpp17.depr]{\ref{depr}: compatibility features} \nodiffref -\change Remove \tcode{uncaught_exception}. +\change +Remove \tcode{uncaught_exception}. \rationale The function did not have a clear specification when multiple exceptions were active, and has been superseded by \tcode{uncaught_exceptions}. @@ -2321,7 +2525,8 @@ for clear and portable semantics. \nodiffref -\change Remove support for adaptable function API. +\change +Remove support for adaptable function API. \rationale The deprecated support relied on a limited convention that could not be extended to support the general case or new language features. It has been @@ -2336,7 +2541,8 @@ compile. \nodiffref -\change Remove redundant members from \tcode{std::allocator}. +\change +Remove redundant members from \tcode{std::allocator}. \rationale \tcode{std::allocator} was overspecified, encouraging direct usage in user containers rather than relying on \tcode{std::allocator_traits}, leading to poor containers. @@ -2348,7 +2554,8 @@ \tcode{allocate} with an additional hint argument, may fail to compile. \nodiffref -\change Remove \tcode{raw_storage_iterator}. +\change +Remove \tcode{raw_storage_iterator}. \rationale The iterator encouraged use of algorithms that might throw exceptions, but did not return the number of elements successfully constructed that might need to @@ -2357,7 +2564,8 @@ A valid \CppXVII{} program that uses this iterator class may fail to compile. \nodiffref -\change Remove temporary buffers API. +\change +Remove temporary buffers API. \rationale The temporary buffer facility was intended to provide an efficient optimization for small memory requests, but there is little evidence this was achieved in @@ -2368,7 +2576,8 @@ \tcode{return_temporary_buffer} may fail to compile. \nodiffref -\change Remove \tcode{shared_ptr::unique}. +\change +Remove \tcode{shared_ptr::unique}. \rationale The result of a call to this member function is not reliable in the presence of multiple threads and weak pointers. The member function \tcode{use_count} is @@ -2379,7 +2588,8 @@ object may fail to compile. \diffref{depr.meta.types} -\change Remove deprecated type traits. +\change +Remove deprecated type traits. \rationale The traits had unreliable or awkward interfaces. The \tcode{is_literal_type} trait provided no way to detect which subset of constructors and member From ab2ae01387d493148693ee5ae63e032eae3b0bb4 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 14 Sep 2019 00:25:48 +0200 Subject: [PATCH 17/99] [basic.stc.dynamic.safety] Avoid undefined term 'dynamic object'. (#3225) --- source/basic.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/basic.tex b/source/basic.tex index ccda696b31..5b87b7cd93 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -3830,7 +3830,7 @@ \end{itemize} \pnum -A pointer value is a \defn{safely-derived pointer} to a dynamic object only if it +A pointer value is a \defn{safely-derived pointer} to an object with dynamic storage duration only if it has an object pointer type and it is one of the following: \begin{itemize} \item the value returned by a call to the \Cpp{} standard library implementation of From a9f6cedab5ea58cd74f809086accc2a7779a078c Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 14 Sep 2019 00:40:05 +0200 Subject: [PATCH 18/99] [temp.param] Define X in the example. (#3226) --- source/templates.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/templates.tex b/source/templates.tex index 58e154d43c..c9bd9c8c15 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -415,6 +415,7 @@ \end{note} \begin{example} \begin{codeblock} +using X = int; struct A { friend bool operator==(const A&, const A&) = default; }; template void f() { i++; // error: change of template-parameter value From df69a5194d0903a8a2a574aeffd4a486d98d7122 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 14 Sep 2019 21:32:26 +0200 Subject: [PATCH 19/99] [basic.stc.dynamic.safety] Fix ambiguous antecedent for 'it'. (#3228) --- source/basic.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 5b87b7cd93..dba9f2fc33 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -3830,8 +3830,9 @@ \end{itemize} \pnum -A pointer value is a \defn{safely-derived pointer} to an object with dynamic storage duration only if it -has an object pointer type and it is one of the following: +A pointer value is a \defn{safely-derived pointer} to an object with dynamic storage duration +only if the pointer value has an object pointer type +and is one of the following: \begin{itemize} \item the value returned by a call to the \Cpp{} standard library implementation of \tcode{::operator new(std::\brk{}size_t)} or From af85c4c882efc554a99cf46cc0044b23ef7da322 Mon Sep 17 00:00:00 2001 From: onihusube <44743040+onihusube@users.noreply.github.com> Date: Thu, 19 Sep 2019 03:21:35 +0900 Subject: [PATCH 20/99] [class.spaceship] Fix weak_ordering::equal to equivalent (#3220) --- source/classes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/classes.tex b/source/classes.tex index 32fac86631..1cb17a67f5 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -6871,7 +6871,7 @@ \item Otherwise, if \tcode{R} is \tcode{weak_ordering}, then \begin{codeblock} -a == b ? weak_ordering::equal : +a == b ? weak_ordering::equivalent : a < b ? weak_ordering::less : weak_ordering::greater \end{codeblock} From e02bdecfb150dbd9f1086912317024d1c9d06cd7 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 18 Sep 2019 19:24:06 +0100 Subject: [PATCH 21/99] [concepts.arithmetic] Fix notes that use undefined terms (#3223) The terms "signed integral types" and "unsigned integral types" are not defined in [basic.fundamental]. The notes are trying to talk about signed/unsigned *integer* types. char and bool are not signed or unsigned *integer* types, but they certainly are *integral* types, and so they model one of signed_integral or unsigned_integral. --- source/concepts.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index b94f4cce6f..af0c6da488 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -486,13 +486,13 @@ \pnum \begin{note} \libconcept{signed_integral} can be modeled even by types that are -not signed integral types\iref{basic.fundamental}; for example, \tcode{char}. +not signed integer types\iref{basic.fundamental}; for example, \tcode{char}. \end{note} \pnum \begin{note} \libconcept{unsigned_integral} can be modeled even by types that are -not unsigned integral types\iref{basic.fundamental}; for example, \tcode{bool}. +not unsigned integer types\iref{basic.fundamental}; for example, \tcode{bool}. \end{note} \end{itemdescr} From e287e8227303672b78e01c44020087e644411d4e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2019 15:08:41 -0600 Subject: [PATCH 22/99] [dcl.constexpr] Remove whitespace at start of paragraph. --- source/declarations.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 56eae8421a..154d27902b 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -825,8 +825,8 @@ shall not be declared with the \tcode{consteval} specifier. \pnum -\indextext{specifier!\idxcode{constexpr}!function} -\indextext{constexpr function} +\indextext{specifier!\idxcode{constexpr}!function}% +\indextext{constexpr function}% The definition of a constexpr function shall satisfy the following requirements: From 8fdd7d4307f1ea0ecf1af00503142f46e23bd15f Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 23 Sep 2019 22:39:44 -0700 Subject: [PATCH 23/99] [ostream.iterator] Correct typo (#3240) --- source/iterators.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/iterators.tex b/source/iterators.tex index cace82470d..2f22114799 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -5847,7 +5847,7 @@ using traits_type = traits; using ostream_type = basic_ostream; - constexpr ostreambuf_iterator() noexcept = default; + constexpr ostream_iterator() noexcept = default; ostream_iterator(ostream_type& s); ostream_iterator(ostream_type& s, const charT* delimiter); ostream_iterator(const ostream_iterator& x); From 3e76c6d1edce67ee40e83562f9139b395e7c4981 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Tue, 10 Sep 2019 22:38:28 +0200 Subject: [PATCH 24/99] [std] Make sure \pnum is on a line of its own. --- source/containers.tex | 27 ++- source/diagnostics.tex | 6 +- source/future.tex | 3 +- source/iostreams.tex | 9 +- source/iterators.tex | 60 ++++-- source/layout.tex | 3 +- source/macros.tex | 3 +- source/numerics.tex | 408 ++++++++++++++++++++++++++------------- source/regex.tex | 165 ++++++++++------ source/strings.tex | 3 +- source/support.tex | 90 ++++++--- source/templates.tex | 3 +- source/threads.tex | 171 +++++++++++------ source/utilities.tex | 420 +++++++++++++++++++++++++++-------------- 14 files changed, 914 insertions(+), 457 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 1d33725654..74fdc20fdd 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -1337,9 +1337,11 @@ \tcode{nh.alloc_}. \end{itemize} -\pnum \returns \tcode{*this}. +\pnum +\returns \tcode{*this}. -\pnum \throws Nothing. +\pnum +\throws Nothing. \end{itemdescr} \rSec3[container.node.dtor]{Destructor} @@ -3378,7 +3380,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{N}. +\pnum +\returns \tcode{N}. \end{itemdescr} \indexlibrarymember{array}{data}% @@ -3388,7 +3391,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \returns +\pnum +\returns A pointer such that \range{data()}{data() + size()} is a valid range. For a non-empty array, \tcode{data()} \tcode{==} \tcode{addressof(front())}. \end{itemdescr} @@ -3432,7 +3436,8 @@ \pnum \constraints \tcode{N == 0} or \tcode{is_swappable_v} is \tcode{true}. -\pnum\effects +\pnum +\effects As if by \tcode{x.swap(y)}. \pnum @@ -3442,9 +3447,11 @@ \rSec3[array.zero]{Zero-sized arrays} \indextext{\idxcode{array}!zero sized}% -\pnum\tcode{array} shall provide support for the special case \tcode{N == 0}. +\pnum +\tcode{array} shall provide support for the special case \tcode{N == 0}. -\pnum In the case that \tcode{N == 0}, \tcode{begin() == end() ==} unique value. +\pnum +In the case that \tcode{N == 0}, \tcode{begin() == end() ==} unique value. The return value of \tcode{data()} is unspecified. \pnum @@ -9308,7 +9315,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects Constructs an empty \tcode{unordered_multiset} using the specified hash function, key equality predicate, and allocator, and using at least \tcode{n} buckets. If \tcode{n} is not @@ -9319,7 +9327,8 @@ \range{il.begin()}{il.end()} for the second form. \tcode{max_load_factor()} returns \tcode{1.0}. -\pnum\complexity Average case linear, worst case quadratic. +\pnum +\complexity Average case linear, worst case quadratic. \end{itemdescr} \rSec3[unord.multiset.erasure]{Erasure} diff --git a/source/diagnostics.tex b/source/diagnostics.tex index 8ef0376b6d..bd751d600c 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -816,7 +816,8 @@ } \end{codeblock} -\pnum The value of each \tcode{enum errc} constant shall be the same as +\pnum +The value of each \tcode{enum errc} constant shall be the same as the value of the \tcode{} macro shown in the above synopsis. Whether or not the \tcode{} implementation exposes the \tcode{} macros is unspecified. @@ -1483,7 +1484,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum The specializations are enabled\iref{unord.hash}. +\pnum +The specializations are enabled\iref{unord.hash}. \end{itemdescr} \rSec2[syserr.syserr]{Class \tcode{system_error}} diff --git a/source/future.tex b/source/future.tex index f726e1cd03..8b5919eb59 100644 --- a/source/future.tex +++ b/source/future.tex @@ -1844,7 +1844,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects After this call, \tcode{capacity()} has an unspecified value greater than or equal to \tcode{size()}. \begin{note} This is a non-binding shrink to fit request. \end{note} diff --git a/source/iostreams.tex b/source/iostreams.tex index ca8ffe6189..969e91d3be 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -2759,10 +2759,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Calls \tcode{str.setf(ios_base::fixed | ios_base::scientific, +\pnum +\effects Calls \tcode{str.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield)}. -\pnum\returns \tcode{str}. +\pnum +\returns \tcode{str}. \end{itemdescr} \pnum @@ -6838,7 +6840,8 @@ \rSec2[std.manip]{Standard manipulators} -\pnum The header \tcode{} defines several functions that support +\pnum +The header \tcode{} defines several functions that support extractors and inserters that alter information maintained by class \tcode{ios_base} and its derived classes. diff --git a/source/iterators.tex b/source/iterators.tex index 2f22114799..99df52078e 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -6380,7 +6380,8 @@ -> decltype(std::begin(c)); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{std::begin(c)}. +\pnum +\returns \tcode{std::begin(c)}. \end{itemdescr} \indexlibrary{\idxcode{cend(const C\&)}}% @@ -6389,7 +6390,8 @@ -> decltype(std::end(c)); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{std::end(c)}. +\pnum +\returns \tcode{std::end(c)}. \end{itemdescr} \indexlibrary{\idxcode{rbegin(C\&)}}% @@ -6398,7 +6400,8 @@ template constexpr auto rbegin(const C& c) -> decltype(c.rbegin()); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{c.rbegin()}. +\pnum +\returns \tcode{c.rbegin()}. \end{itemdescr} \indexlibrary{\idxcode{rend(C\&)}}% @@ -6407,7 +6410,8 @@ template constexpr auto rend(const C& c) -> decltype(c.rend()); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{c.rend()}. +\pnum +\returns \tcode{c.rend()}. \end{itemdescr} \indexlibrary{\idxcode{rbegin(T (\&array)[N])}}% @@ -6415,7 +6419,8 @@ template constexpr reverse_iterator rbegin(T (&array)[N]); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{reverse_iterator(array + N)}. +\pnum +\returns \tcode{reverse_iterator(array + N)}. \end{itemdescr} \indexlibrary{\idxcode{rend(T (\&array)[N])}}% @@ -6423,7 +6428,8 @@ template constexpr reverse_iterator rend(T (&array)[N]); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{reverse_iterator(array)}. +\pnum +\returns \tcode{reverse_iterator(array)}. \end{itemdescr} \indexlibrary{\idxcode{rbegin(initializer_list)}}% @@ -6431,7 +6437,8 @@ template constexpr reverse_iterator rbegin(initializer_list il); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{reverse_iterator(il.end())}. +\pnum +\returns \tcode{reverse_iterator(il.end())}. \end{itemdescr} \indexlibrary{\idxcode{rend(initializer_list)}}% @@ -6439,7 +6446,8 @@ template constexpr reverse_iterator rend(initializer_list il); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{reverse_iterator(il.begin())}. +\pnum +\returns \tcode{reverse_iterator(il.begin())}. \end{itemdescr} \indexlibrary{\idxcode{crbegin(const C\& c)}}% @@ -6447,7 +6455,8 @@ template constexpr auto crbegin(const C& c) -> decltype(std::rbegin(c)); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{std::rbegin(c)}. +\pnum +\returns \tcode{std::rbegin(c)}. \end{itemdescr} \indexlibrary{\idxcode{crend(const C\& c)}}% @@ -6455,7 +6464,8 @@ template constexpr auto crend(const C& c) -> decltype(std::rend(c)); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{std::rend(c)}. +\pnum +\returns \tcode{std::rend(c)}. \end{itemdescr} \indexlibrary{\idxcode{size(C\& c)}}% @@ -6463,7 +6473,8 @@ template constexpr auto size(const C& c) -> decltype(c.size()); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{c.size()}. +\pnum +\returns \tcode{c.size()}. \end{itemdescr} \indexlibrary{\idxcode{size(T (\&array)[N])}}% @@ -6471,7 +6482,8 @@ template constexpr size_t size(const T (&array)[N]) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{N}. +\pnum +\returns \tcode{N}. \end{itemdescr} \indexlibrary{\idxcode{ssize(C\& c)}}% @@ -6480,7 +6492,8 @@ -> common_type_t>; \end{itemdecl} \begin{itemdescr} -\pnum \returns +\pnum +\returns \begin{codeblock} static_cast>>(c.size()) \end{codeblock} @@ -6491,7 +6504,8 @@ template constexpr ptrdiff_t ssize(const T (&array)[N]) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{N}. +\pnum +\returns \tcode{N}. \end{itemdescr} \indexlibrary{\idxcode{empty(C\& c)}}% @@ -6499,7 +6513,8 @@ template [[nodiscard]] constexpr auto empty(const C& c) -> decltype(c.empty()); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{c.empty()}. +\pnum +\returns \tcode{c.empty()}. \end{itemdescr} \indexlibrary{\idxcode{empty(T (\&array)[N])}}% @@ -6507,7 +6522,8 @@ template [[nodiscard]] constexpr bool empty(const T (&array)[N]) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{false}. +\pnum +\returns \tcode{false}. \end{itemdescr} \indexlibrary{\idxcode{empty(initializer_list)}}% @@ -6515,7 +6531,8 @@ template [[nodiscard]] constexpr bool empty(initializer_list il) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{il.size() == 0}. +\pnum +\returns \tcode{il.size() == 0}. \end{itemdescr} \indexlibrary{\idxcode{data(C\& c)}}% @@ -6524,7 +6541,8 @@ template constexpr auto data(const C& c) -> decltype(c.data()); \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{c.data()}. +\pnum +\returns \tcode{c.data()}. \end{itemdescr} \indexlibrary{\idxcode{data(T (\&array)[N])}}% @@ -6532,7 +6550,8 @@ template constexpr T* data(T (&array)[N]) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{array}. +\pnum +\returns \tcode{array}. \end{itemdescr} \indexlibrary{\idxcode{data(initializer_list)}}% @@ -6540,5 +6559,6 @@ template constexpr const E* data(initializer_list il) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{il.begin()}. +\pnum +\returns \tcode{il.begin()}. \end{itemdescr} diff --git a/source/layout.tex b/source/layout.tex index 58a97cec00..fdbaeb806b 100644 --- a/source/layout.tex +++ b/source/layout.tex @@ -65,7 +65,8 @@ }}} \makeatother -\def\pnum{\parabullnum{Paras}{0pt}} +\def\pnum +{\parabullnum{Paras}{0pt}} % Leave more room for section numbers in TOC \cftsetindents{section}{1.5em}{3.0em} diff --git a/source/macros.tex b/source/macros.tex index 5e81f4df44..8a014fce38 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -368,7 +368,8 @@ \cs_set_eq:NN \diffrefs \diffref \ExplSyntaxOff % \nodiffref swallows a following \change and removes the preceding line break. -\def\nodiffref\change{\pnum\diffhead{Change}} +\def\nodiffref\change{\pnum +\diffhead{Change}} \newcommand{\change}{\diffdef{Change}} \newcommand{\rationale}{\diffdef{Rationale}} \newcommand{\effect}{\diffdef{Effect on original feature}} diff --git a/source/numerics.tex b/source/numerics.tex index 59f7d32285..e455f07b71 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2490,7 +2490,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects The base engine is initialized as if by its default constructor. \end{itemdescr} @@ -2500,7 +2501,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns +\pnum +\returns \tcode{true} if \tcode{a1}'s base engine is equal to \tcode{a2}'s base engine. Otherwise returns \tcode{false}. \end{itemdescr} @@ -2511,7 +2513,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects The base engine is initialized with \tcode{s}. \end{itemdescr} @@ -2522,7 +2525,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects The base engine is initialized with \tcode{q}. \end{itemdescr} @@ -2532,7 +2536,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects With \tcode{b} as the base engine, invokes \tcode{b.seed()}. \end{itemdescr} @@ -2541,7 +2546,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects With \tcode{b} as the base engine, invokes \tcode{b.seed(s)}. \end{itemdescr} @@ -2550,7 +2556,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects With \tcode{b} as the base engine, invokes \tcode{b.seed(q)}. \end{itemdescr} @@ -3047,7 +3054,8 @@ and \tcode{c < m}. -\pnum The textual representation% +\pnum +The textual representation% \indextext{\idxcode{linear_congruential_engine}!textual representation} consists of the value of \state{x}{i}. @@ -3058,7 +3066,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{linear_congruential_engine} object. +\pnum +\effects Constructs a \tcode{linear_congruential_engine} object. If $c \bmod m$ is $0$ and $\tcode{s} \bmod m$ is $0$, sets the engine's state to $1$, otherwise sets the engine's state to $\tcode{s} \bmod m$. @@ -3070,7 +3079,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{linear_congruential_engine} object. +\pnum +\effects Constructs a \tcode{linear_congruential_engine} object. With $k = \left\lceil \frac{\log_2 m}{32} \right\rceil$ and $a$ an array (or equivalent) @@ -3228,7 +3238,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{mersenne_twister_engine} object. +\pnum +\effects Constructs a \tcode{mersenne_twister_engine} object. Sets $X_{-n}$ to $\tcode{value} \bmod 2^w$. Then, iteratively for $i = 1 - n, \dotsc, -1$, sets $X_i$ to \[% @@ -3240,7 +3251,8 @@ \; \mbox{.} \]% -\pnum\complexity \bigoh{n}. +\pnum +\complexity \bigoh{n}. \end{itemdescr} \indexlibrary{\idxcode{mersenne_twister_engine}!constructor}% @@ -3249,7 +3261,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{mersenne_twister_engine} object. +\pnum +\effects Constructs a \tcode{mersenne_twister_engine} object. With $k = \left\lceil w / 32 \right\rceil$ and $a$ an array (or equivalent) @@ -3379,7 +3392,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{subtract_with_carry_engine} object. +\pnum +\effects Constructs a \tcode{subtract_with_carry_engine} object. Sets the values of $X_{-r}, \dotsc, X_{-1}$, in that order, as specified below. @@ -3400,7 +3414,8 @@ of \tcode{e} taken modulo $2^{32}$. Set $X_k$ to $\left( \sum_{j=0}^{n-1} z_j \cdot 2^{32j}\right) \bmod m$. -\pnum\complexity Exactly $n \cdot \tcode{r}$ invocations +\pnum +\complexity Exactly $n \cdot \tcode{r}$ invocations of \tcode{e}. \end{itemdescr} @@ -3412,7 +3427,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{subtract_with_carry_engine} object. +\pnum +\effects Constructs a \tcode{subtract_with_carry_engine} object. With $k = \left\lceil w / 32 \right\rceil$ and $a$ an array (or equivalent) @@ -3862,7 +3878,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{minstd_rand0} @@ -3877,7 +3894,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{minstd_rand} @@ -3893,7 +3911,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{mt19937} @@ -3913,7 +3932,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{mt19937_64} @@ -3928,7 +3948,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{ran\-lux24_base} @@ -3944,7 +3965,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{ran\-lux48_base} @@ -3959,7 +3981,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{ranlux24} @@ -3974,7 +3997,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{ranlux48} @@ -3989,7 +4013,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\required +\pnum +\required The $10000^\text{th}$ consecutive invocation of a default-constructed object of type \tcode{knuth_b} @@ -4003,7 +4028,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\remarks +\pnum +\remarks The choice of engine type named by this \tcode{typedef} is \impldef{type of \tcode{default_random_engine}}. @@ -4085,7 +4111,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{random_device} +\pnum +\effects Constructs a \tcode{random_device} nondeterministic uniform random bit generator object. The semantics of the \tcode{token} parameter and the token value used by the default constructor are @@ -4107,7 +4134,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns If the implementation employs a random number engine, +\pnum +\returns If the implementation employs a random number engine, returns $0.0$. Otherwise, returns an entropy estimate\footnote{If a device has $n$ states whose respective probabilities are @@ -4127,7 +4155,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A nondeterministic random value, +\pnum +\returns A nondeterministic random value, uniformly distributed between \tcode{min()} and \tcode{max()} (inclusive). It is \impldef{how \tcode{random_device::operator()} generates values} @@ -4197,7 +4226,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{seed_seq} object +\pnum +\effects Constructs a \tcode{seed_seq} object as if by default-constructing its member \tcode{v}. \pnum @@ -4212,9 +4242,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires \tcode{T} shall be an integer type. +\pnum +\requires \tcode{T} shall be an integer type. -\pnum\effects +\pnum +\effects Same as \tcode{seed_seq(il.begin(), il.end())}. \end{itemdescr} @@ -4226,14 +4258,16 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires \tcode{InputIterator} shall meet the \oldconcept{InputIterator} requirements\iref{input.iterators}. Moreover, \tcode{iterator_traits::value_type} shall denote an integer type. -\pnum\effects Constructs a \tcode{seed_seq} object +\pnum +\effects Constructs a \tcode{seed_seq} object by the following algorithm: \begin{codeblock} for (InputIterator s = begin; s != end; ++s) @@ -4248,7 +4282,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires \tcode{RandomAccessIterator} +\pnum +\requires \tcode{RandomAccessIterator} shall meet the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} and the requirements of a mutable iterator. @@ -4257,7 +4292,8 @@ shall denote an unsigned integer type capable of accommodating 32-bit quantities. -\pnum\effects +\pnum +\effects Does nothing if \tcode{begin == end}. Otherwise, with $s = \tcode{v.size()}$ @@ -4330,7 +4366,8 @@ set \tcode{begin[$k$]} to $r_4$. \end{itemize} -\pnum\throws +\pnum +\throws What and when \tcode{RandomAccessIterator} operations of \tcode{begin} and \tcode{end} throw. \end{itemdescr} @@ -4341,11 +4378,13 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The number of 32-bit units +\pnum +\returns The number of 32-bit units that would be returned by a call to \tcode{param()}. -\pnum\complexity Constant time. +\pnum +\complexity Constant time. \end{itemdescr} \indexlibrarymember{param}{seed_seq}% @@ -4355,7 +4394,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires \tcode{OutputIterator} shall meet the \oldconcept{OutputIterator} requirements\iref{output.iterators}. Moreover, @@ -4363,14 +4403,16 @@ \tcode{*dest = rt} shall be valid for a value \tcode{rt} of type \tcode{result_type}. -\pnum\effects Copies the sequence of prepared 32-bit units +\pnum +\effects Copies the sequence of prepared 32-bit units to the given destination, as if by executing the following statement: \begin{codeblock} copy(v.begin(), v.end(), dest); \end{codeblock} -\pnum\throws +\pnum +\throws What and when \tcode{OutputIterator} operations of \tcode{dest} throw. \end{itemdescr} @@ -4414,7 +4456,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\complexity Exactly +\pnum +\complexity Exactly $k = \max(1, \left\lceil b / \log_2 R \right\rceil)$ invocations of \tcode{g}, @@ -4427,7 +4470,8 @@ and $R$ is the value of $\tcode{g.max()} - \tcode{g.min()} + 1$. -\pnum\effects +\pnum +\effects Invokes \tcode{g()} $k$ times to obtain values $g_0, \dotsc, g_{k-1}$, respectively. Calculates a quantity @@ -4441,7 +4485,8 @@ \pnum \returns $S / R^k$. -\pnum\throws What and when \tcode{g} throws. +\pnum +\throws What and when \tcode{g} throws. \end{itemdescr}% \indextext{random number generation!utilities|)} @@ -4556,10 +4601,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires $\tcode{a} \leq \tcode{b}$. -\pnum\effects Constructs a \tcode{uniform_int_distribution} object; +\pnum +\effects Constructs a \tcode{uniform_int_distribution} object; \tcode{a} and \tcode{b} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -4570,7 +4617,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{a} parameter +\pnum +\returns The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -4580,7 +4628,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{b} parameter +\pnum +\returns The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr} @@ -4643,12 +4692,14 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires $\tcode{a} \leq \tcode{b}$ and $\tcode{b} - \tcode{a} \leq \tcode{numeric_limits::max()}$. -\pnum\effects Constructs a \tcode{uniform_real_distribution} object; +\pnum +\effects Constructs a \tcode{uniform_real_distribution} object; \tcode{a} and \tcode{b} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -4659,7 +4710,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{a} parameter +\pnum +\returns The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -4669,7 +4721,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{b} parameter +\pnum +\returns The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr}% \indextext{random number distributions!uniform|)}% @@ -4743,10 +4796,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires $0 \leq \tcode{p} \leq 1$. -\pnum\effects Constructs a \tcode{bernoulli_distribution} object; +\pnum +\effects Constructs a \tcode{bernoulli_distribution} object; \tcode{p} corresponds to the parameter of the distribution. \end{itemdescr} @@ -4757,7 +4812,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{p} parameter +\pnum +\returns The value of the \tcode{p} parameter with which the object was constructed. \end{itemdescr} @@ -4816,10 +4872,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires $0 \leq \tcode{p} \leq 1$ and $0 \leq \tcode{t} $. -\pnum\effects Constructs a \tcode{binomial_distribution} object; +\pnum +\effects Constructs a \tcode{binomial_distribution} object; \tcode{t} and \tcode{p} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -4829,7 +4887,8 @@ IntType t() const; \end{itemdecl}% \begin{itemdescr} -\pnum\returns The value of the \tcode{t} parameter +\pnum +\returns The value of the \tcode{t} parameter with which the object was constructed. \end{itemdescr} @@ -4839,7 +4898,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{p} parameter +\pnum +\returns The value of the \tcode{p} parameter with which the object was constructed. \end{itemdescr} @@ -4897,10 +4957,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires $0 < \tcode{p} < 1$. -\pnum\effects Constructs a \tcode{geometric_distribution} object; +\pnum +\effects Constructs a \tcode{geometric_distribution} object; \tcode{p} corresponds to the parameter of the distribution. \end{itemdescr} @@ -4911,7 +4973,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{p} parameter +\pnum +\returns The value of the \tcode{p} parameter with which the object was constructed. \end{itemdescr} @@ -4974,11 +5037,13 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires $0 < \tcode{p} \leq 1$ and $0 < \tcode{k} $. -\pnum\effects Constructs a \tcode{negative_binomial_distribution} object; +\pnum +\effects Constructs a \tcode{negative_binomial_distribution} object; \tcode{k} and \tcode{p} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -4989,7 +5054,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{k} parameter +\pnum +\returns The value of the \tcode{k} parameter with which the object was constructed. \end{itemdescr} @@ -4999,7 +5065,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{p} parameter +\pnum +\returns The value of the \tcode{p} parameter with which the object was constructed. \end{itemdescr}% \indextext{random number distributions!Bernoulli|)}% @@ -5089,7 +5156,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{mean} parameter +\pnum +\returns The value of the \tcode{mean} parameter with which the object was constructed. \end{itemdescr} @@ -5161,7 +5229,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{lambda} parameter +\pnum +\returns The value of the \tcode{lambda} parameter with which the object was constructed. \end{itemdescr} @@ -5237,7 +5306,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{alpha} parameter +\pnum +\returns The value of the \tcode{alpha} parameter with which the object was constructed. \end{itemdescr} @@ -5247,7 +5317,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{beta} parameter +\pnum +\returns The value of the \tcode{beta} parameter with which the object was constructed. \end{itemdescr} @@ -5324,7 +5395,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{a} parameter +\pnum +\returns The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -5334,7 +5406,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{b} parameter +\pnum +\returns The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr} @@ -5418,7 +5491,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{a} parameter +\pnum +\returns The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -5428,7 +5502,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{b} parameter +\pnum +\returns The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr}% \indextext{random number distributions!Poisson|)}% @@ -5533,7 +5608,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{mean} parameter +\pnum +\returns The value of the \tcode{mean} parameter with which the object was constructed. \end{itemdescr} @@ -5543,7 +5619,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{stddev} parameter +\pnum +\returns The value of the \tcode{stddev} parameter with which the object was constructed. \end{itemdescr} @@ -5620,7 +5697,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{m} parameter +\pnum +\returns The value of the \tcode{m} parameter with which the object was constructed. \end{itemdescr} @@ -5630,7 +5708,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{s} parameter +\pnum +\returns The value of the \tcode{s} parameter with which the object was constructed. \end{itemdescr} @@ -5703,7 +5782,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{n} parameter +\pnum +\returns The value of the \tcode{n} parameter with which the object was constructed. \end{itemdescr} @@ -5778,7 +5858,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{a} parameter +\pnum +\returns The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -5788,7 +5869,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{b} parameter +\pnum +\returns The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr} @@ -5867,7 +5949,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{m} parameter +\pnum +\returns The value of the \tcode{m} parameter with which the object was constructed. \end{itemdescr} @@ -5877,7 +5960,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{n} parameter +\pnum +\returns The value of the \tcode{n} parameter with which the object was constructed. \end{itemdescr} @@ -5953,7 +6037,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The value of the \tcode{n} parameter +\pnum +\returns The value of the \tcode{n} parameter with which the object was constructed. \end{itemdescr}% \indextext{random number distributions!normal|)}% @@ -6041,7 +6126,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{discrete_distribution} object +\pnum +\effects Constructs a \tcode{discrete_distribution} object with $n = 1$ and $p_0 = 1$. \begin{note} Such an object will always deliver the value $0$. @@ -6081,7 +6167,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects Same as \tcode{discrete_distribution(wl.begin(), wl.end())}. \end{itemdescr} @@ -6092,7 +6179,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires Each instance of type \tcode{UnaryOperation} shall be a function object\iref{function.objects} whose return type shall be convertible to \tcode{double}. @@ -6104,7 +6192,8 @@ $0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n$ shall hold. -\pnum\effects Constructs a \tcode{discrete_distribution} object +\pnum +\effects Constructs a \tcode{discrete_distribution} object with probabilities given by the formula above, using the following values: If $\tcode{nw} = 0$, @@ -6113,7 +6202,8 @@ let $w_k = \tcode{fw}(\tcode{xmin} + k \cdot \delta + \delta / 2)$ for $k = 0, \dotsc, n - 1$. -\pnum\complexity +\pnum +\complexity The number of invocations of \tcode{fw} shall not exceed $n$. \end{itemdescr} @@ -6123,7 +6213,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A \tcode{vector} +\pnum +\returns A \tcode{vector} whose \tcode{size} member returns $n$ and whose \tcode{operator[]} member returns $p_k$ when invoked with argument $k$ for $k = 0, \dotsc, n - 1$. @@ -6214,7 +6305,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{piecewise_constant_distribution} object +\pnum +\effects Constructs a \tcode{piecewise_constant_distribution} object with $n = 1$, $\rho_0 = 1$, $b_0 = 0$, @@ -6230,7 +6322,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires \tcode{InputIteratorB} and \tcode{InputIteratorW} shall each meet the \oldconcept{InputIterator} requirements\iref{input.iterators}. @@ -6252,7 +6345,8 @@ shall be at least $n$, and any $w_k$ for $k \geq n$ shall be ignored by the distribution. -\pnum\effects Constructs a \tcode{piecewise_constant_distribution} object +\pnum +\effects Constructs a \tcode{piecewise_constant_distribution} object with parameters as specified above. \end{itemdescr} @@ -6264,7 +6358,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires Each instance of type \tcode{UnaryOperation} shall be a function object\iref{function.objects} whose return type shall be convertible to \tcode{double}. @@ -6272,7 +6367,8 @@ \tcode{double} shall be convertible to the type of \tcode{UnaryOperation}'s sole parameter. -\pnum\effects Constructs a \tcode{piecewise_constant_distribution} object +\pnum +\effects Constructs a \tcode{piecewise_constant_distribution} object with parameters taken or calculated from the following values: If $\tcode{bl.size()} < 2$, @@ -6287,7 +6383,8 @@ let $w_k = \tcode{fw}\bigl(\bigl(b_{k+1} + b_k\bigr) / 2\bigr)$ for $k = 0, \dotsc, n - 1$. -\pnum\complexity +\pnum +\complexity The number of invocations of \tcode{fw} shall not exceed $n$. \end{itemdescr} @@ -6299,7 +6396,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires Each instance of type \tcode{UnaryOperation} shall be a function object\iref{function.objects} whose return type shall be convertible to \tcode{double}. @@ -6310,13 +6408,15 @@ The relation $0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n$ shall hold. -\pnum\effects Constructs a \tcode{piecewise_constant_distribution} object +\pnum +\effects Constructs a \tcode{piecewise_constant_distribution} object with parameters taken or calculated from the following values: Let $b_k = \tcode{xmin} + k \cdot \delta $ for $ k = 0, \dotsc, n$, and $w_k = \tcode{fw}(b_k + \delta / 2) $ for $ k = 0, \dotsc, n - 1$. -\pnum\complexity +\pnum +\complexity The number of invocations of \tcode{fw} shall not exceed $n$. \end{itemdescr} @@ -6326,7 +6426,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A \tcode{vector} +\pnum +\returns A \tcode{vector} whose \tcode{size} member returns $n + 1$ and whose $ \tcode{operator[]} $ member returns $b_k$ when invoked with argument $k$ for $k = 0, \dotsc, n $. @@ -6338,7 +6439,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A \tcode{vector} +\pnum +\returns A \tcode{vector} whose \tcode{size} member returns $n$ and whose $ \tcode{operator[]} $ member returns $\rho_k$ when invoked with argument $k$ for $k = 0, \dotsc, n - 1$. @@ -6427,7 +6529,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{piecewise_linear_distribution} object +\pnum +\effects Constructs a \tcode{piecewise_linear_distribution} object with $n = 1$, $\rho_0 = \rho_1 = 1$, $b_0 = 0$, @@ -6442,7 +6545,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires \tcode{InputIteratorB} and \tcode{InputIteratorW} shall each meet the \oldconcept{InputIterator} requirements\iref{input.iterators}. @@ -6464,7 +6568,8 @@ shall be at least $n+1$, and any $w_k$ for $k \geq n + 1$ shall be ignored by the distribution. -\pnum\effects Constructs a \tcode{piecewise_linear_distribution} object +\pnum +\effects Constructs a \tcode{piecewise_linear_distribution} object with parameters as specified above. \end{itemdescr} @@ -6476,7 +6581,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires Each instance of type \tcode{UnaryOperation} shall be a function object\iref{function.objects} whose return type shall be convertible to \tcode{double}. @@ -6484,7 +6590,8 @@ \tcode{double} shall be convertible to the type of \tcode{UnaryOperation}'s sole parameter. -\pnum\effects Constructs a \tcode{piecewise_linear_distribution} object +\pnum +\effects Constructs a \tcode{piecewise_linear_distribution} object with parameters taken or calculated from the following values: If $\tcode{bl.size()} < 2$, @@ -6499,7 +6606,8 @@ let $w_k = \tcode{fw}(b_k)$ for $k = 0, \dotsc, n$. -\pnum\complexity +\pnum +\complexity The number of invocations of \tcode{fw} shall not exceed $n+1$. \end{itemdescr} @@ -6511,7 +6619,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires Each instance of type \tcode{UnaryOperation} shall be a function object\iref{function.objects} whose return type shall be convertible to \tcode{double}. @@ -6522,13 +6631,15 @@ The relation $0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n$ shall hold. -\pnum\effects Constructs a \tcode{piecewise_linear_distribution} object +\pnum +\effects Constructs a \tcode{piecewise_linear_distribution} object with parameters taken or calculated from the following values: Let $b_k = \tcode{xmin} + k \cdot \delta$ for $k = 0, \dotsc, n$, and $w_k = \tcode{fw}(b_k)$ for $k = 0, \dotsc, n$. -\pnum\complexity +\pnum +\complexity The number of invocations of \tcode{fw} shall not exceed $n+1$. \end{itemdescr} @@ -6538,7 +6649,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A \tcode{vector} +\pnum +\returns A \tcode{vector} whose \tcode{size} member returns $n + 1$ and whose $ \tcode{operator[]} $ member returns $b_k$ when invoked with argument $k$ for $k = 0, \dotsc, n$. @@ -6550,7 +6662,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A \tcode{vector} +\pnum +\returns A \tcode{vector} whose \tcode{size} member returns $n$ and whose $ \tcode{operator[]} $ member returns $\rho_k$ when invoked with argument $k$ for $k = 0, \dotsc, n$. @@ -9676,7 +9789,8 @@ \rSec2[sf.cmath]{Mathematical special functions}% \indextext{mathematical special functions|(}% -\pnum\indextext{NaN}\indextext{domain error}% +\pnum +\indextext{NaN}\indextext{domain error}% If any argument value to any of the functions specified in this subclause is a NaN (Not a Number), @@ -9774,7 +9888,8 @@ \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the associated Legendre functions of their respective arguments @@ -9971,13 +10086,15 @@ \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the cylindrical Bessel functions of the first kind of their respective arguments \tcode{nu} and \tcode{x}. -\pnum\returns +\pnum +\returns \[ \mathsf{J}_\nu(x) = \sum_{k=0}^\infty \frac{(-1)^k (x/2)^{\nu+2k}}{k! \: \Gamma(\nu+k+1)} \text{ ,\quad for $x \ge 0$,} \] @@ -9985,7 +10102,8 @@ $\nu$ is \tcode{nu} and $x$ is \tcode{x}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling cylindrical Bessel functions of the first kind with \tcode{nu >= 128}} if \tcode{nu >= 128}. @@ -10005,13 +10123,15 @@ \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the irregular modified cylindrical Bessel functions of their respective arguments \tcode{nu} and \tcode{x}. -\pnum\returns +\pnum +\returns \[% \mathsf{K}_\nu(x) = (\pi/2)\mathrm{i}^{\nu+1} ( \mathsf{J}_\nu(\mathrm{i}x) @@ -10039,12 +10159,14 @@ $\nu$ is \tcode{nu} and $x$ is \tcode{x}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling irregular modified cylindrical Bessel functions with \tcode{nu >= 128}} if \tcode{nu >= 128}. -\pnum See also \ref{sf.cmath.cyl.bessel.i}, \ref{sf.cmath.cyl.bessel.j}, \ref{sf.cmath.cyl.neumann}. +\pnum +See also \ref{sf.cmath.cyl.bessel.i}, \ref{sf.cmath.cyl.bessel.j}, \ref{sf.cmath.cyl.neumann}. \end{itemdescr} \rSec3[sf.cmath.cyl.neumann]{Cylindrical Neumann functions}% @@ -10062,13 +10184,15 @@ \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the cylindrical Neumann functions, also known as the cylindrical Bessel functions of the second kind, of their respective arguments \tcode{nu} and \tcode{x}. -\pnum\returns +\pnum +\returns \[% \mathsf{N}_\nu(x) = \left\{ @@ -10090,12 +10214,14 @@ $\nu$ is \tcode{nu} and $x$ is \tcode{x}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling cylindrical Neumann functions with \tcode{nu >= 128}} if \tcode{nu >= 128}. -\pnum See also \ref{sf.cmath.cyl.bessel.j}. +\pnum +See also \ref{sf.cmath.cyl.bessel.j}. \end{itemdescr} \rSec3[sf.cmath.ellint.1]{Incomplete elliptic integral of the first kind}% @@ -10171,7 +10297,8 @@ \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the incomplete elliptic integral of the third kind of their respective arguments @@ -10201,12 +10328,14 @@ \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the exponential integral of their respective arguments \tcode{x}. -\pnum\returns +\pnum +\returns \[% \mathsf{Ei}(x) = - \int_{-x}^\infty \frac{e^{-t}} @@ -10231,12 +10360,14 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the Hermite polynomials of their respective arguments \tcode{n} and \tcode{x}. -\pnum\returns +\pnum +\returns \[% \mathsf{H}_n(x) = (-1)^n e^{x^2} \frac{ \mathsf{d} ^n} @@ -10247,7 +10378,8 @@ $n$ is \tcode{n} and $x$ is \tcode{x}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling Hermite polynomials with \tcode{n >= 128}} if \tcode{n >= 128}. @@ -10337,12 +10469,14 @@ \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the Riemann zeta function of their respective arguments \tcode{x}. -\pnum\returns +\pnum +\returns \[% \mathsf{\zeta}(x) = \left\{ @@ -10397,12 +10531,14 @@ $n$ is \tcode{n} and $x$ is \tcode{x}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling spherical Bessel functions with \tcode{n >= 128}} if \tcode{n >= 128}. -\pnum See also \ref{sf.cmath.cyl.bessel.j}. +\pnum +See also \ref{sf.cmath.cyl.bessel.j}. \end{itemdescr} \rSec3[sf.cmath.sph.legendre]{Spherical associated Legendre functions}% diff --git a/source/regex.tex b/source/regex.tex index 0699c284cd..3adb6d7195 100644 --- a/source/regex.tex +++ b/source/regex.tex @@ -884,9 +884,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs an object of class \tcode{regex_error}. +\pnum +\effects Constructs an object of class \tcode{regex_error}. -\pnum\ensures \tcode{ecode == code()}. +\pnum +\ensures \tcode{ecode == code()}. \end{itemdescr} \indexlibrary{\idxcode{error_type}}% @@ -896,7 +898,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The error code that was passed to the constructor. +\pnum +\returns The error code that was passed to the constructor. \end{itemdescr} \rSec1[re.traits]{Class template \tcode{regex_traits}} @@ -959,7 +962,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{char_traits::length(p)}. +\pnum +\returns \tcode{char_traits::length(p)}. \end{itemdescr} \indexlibrarymember{regex_traits}{translate}% @@ -968,7 +972,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{c}. +\pnum +\returns \tcode{c}. \end{itemdescr} \indexlibrarymember{regex_traits}{translate_nocase}% @@ -977,7 +982,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{use_facet>(getloc()).tolower(c)}. +\pnum +\returns \tcode{use_facet>(getloc()).tolower(c)}. \end{itemdescr} \indexlibrarymember{regex_traits}{transform}% @@ -987,7 +993,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects As if by: \begin{codeblock} string_type str(first, last); @@ -1022,7 +1029,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A sequence of one or more characters that +\pnum +\returns A sequence of one or more characters that represents the collating element consisting of the character sequence designated by the iterator range \range{first}{last}. Returns an empty string if the character sequence is not a @@ -1037,7 +1045,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns An unspecified value that represents +\pnum +\returns An unspecified value that represents the character classification named by the character sequence designated by the iterator range \range{first}{last}. If the parameter \tcode{icase} is \tcode{true} then the returned mask identifies the @@ -1324,7 +1333,8 @@ \tcode{char_traits::\brk{}length(p)} whose first element is designated by \tcode{p}, and interpreted according to the flags \tcode{f}. -\pnum\ensures +\pnum +\ensures \tcode{flags()} returns \tcode{f}. \tcode{mark_count()} returns the number of marked sub-expressions within the expression. @@ -1348,7 +1358,8 @@ expression contained in the sequence of characters \range{p}{p+len}, and interpreted according the flags specified in \tcode{f}. -\pnum\ensures +\pnum +\ensures \tcode{flags()} returns \tcode{f}. \tcode{mark_count()} returns the number of marked sub-expressions within the expression. @@ -1364,7 +1375,8 @@ \effects Constructs an object of class \tcode{basic_regex} as a copy of the object \tcode{e}. -\pnum\ensures +\pnum +\ensures \tcode{flags()} and \tcode{mark_count()} return \tcode{e.flags()} and \tcode{e.mark_count()}, respectively. \end{itemdescr} @@ -1401,7 +1413,8 @@ expression contained in the string \tcode{s}, and interpreted according to the flags specified in \tcode{f}. -\pnum\ensures +\pnum +\ensures \tcode{flags()} returns \tcode{f}. \tcode{mark_count()} returns the number of marked sub-expressions within the expression. @@ -1425,7 +1438,8 @@ expression contained in the sequence of characters \range{first}{last}, and interpreted according to the flags specified in \tcode{f}. -\pnum\ensures +\pnum +\ensures \tcode{flags()} returns \tcode{f}. \tcode{mark_count()} returns the number of marked sub-expressions within the expression. @@ -1452,7 +1466,8 @@ \pnum \effects Copies \tcode{e} into \tcode{*this} and returns \tcode{*this}. -\pnum\ensures +\pnum +\ensures \tcode{flags()} and \tcode{mark_count()} return \tcode{e.flags()} and \tcode{e.mark_count()}, respectively. \end{itemdescr} @@ -1638,7 +1653,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Returns the result of \tcode{traits_inst.imbue(loc)} where +\pnum +\effects Returns the result of \tcode{traits_inst.imbue(loc)} where \tcode{traits_inst} is a (default-initialized) instance of the template type argument \tcode{traits} stored within the object. After a call to \tcode{imbue} the \tcode{basic_regex} object does not match any @@ -1651,7 +1667,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Returns the result of \tcode{traits_inst.getloc()} where +\pnum +\effects Returns the result of \tcode{traits_inst.getloc()} where \tcode{traits_inst} is a (default-initialized) instance of the template parameter \tcode{traits} stored within the object. \end{itemdescr} @@ -1665,13 +1682,16 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Swaps the contents of the two regular expressions. +\pnum +\effects Swaps the contents of the two regular expressions. -\pnum\ensures \tcode{*this} contains the regular expression +\pnum +\ensures \tcode{*this} contains the regular expression that was in \tcode{e}, \tcode{e} contains the regular expression that was in \tcode{*this}. -\pnum\complexity Constant time. +\pnum +\complexity Constant time. \end{itemdescr} \rSec2[re.regex.nonmemb]{Non-member functions} @@ -1683,7 +1703,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Calls \tcode{lhs.swap(rhs)}. +\pnum +\effects Calls \tcode{lhs.swap(rhs)}. \end{itemdescr} \rSec1[re.submatch]{Class template \tcode{sub_match}} @@ -1739,7 +1760,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{matched ?\ distance(first, second) :\ 0}. +\pnum +\returns \tcode{matched ?\ distance(first, second) :\ 0}. \end{itemdescr} \indexlibrarymember{operator basic_string}{sub_match}% @@ -1748,7 +1770,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{matched ?\ string_type(first, second) :\ string_type()}. +\pnum +\returns \tcode{matched ?\ string_type(first, second) :\ string_type()}. \end{itemdescr} \indexlibrarymember{sub_match}{str}% @@ -1757,7 +1780,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{matched ?\ string_type(first, second) :\ string_type()}. +\pnum +\returns \tcode{matched ?\ string_type(first, second) :\ string_type()}. \end{itemdescr} \indexlibrarymember{sub_match}{compare}% @@ -1766,7 +1790,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{str().compare(s.str())}. +\pnum +\returns \tcode{str().compare(s.str())}. \end{itemdescr} \indexlibrarymember{sub_match}{compare}% @@ -1775,7 +1800,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{str().compare(s)}. +\pnum +\returns \tcode{str().compare(s)}. \end{itemdescr} \indexlibrarymember{sub_match}{compare}% @@ -1784,7 +1810,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{str().compare(s)}. +\pnum +\returns \tcode{str().compare(s)}. \end{itemdescr} \rSec2[re.submatch.op]{Non-member operators} @@ -1802,7 +1829,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{lhs.compare(rhs) == 0}. +\pnum +\returns \tcode{lhs.compare(rhs) == 0}. \end{itemdescr} \indexlibrarymember{sub_match}{operator<=>}% @@ -1812,7 +1840,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{static_cast<\placeholdernc{SM-CAT}(BiIter)>(lhs.compare(rhs) <=> 0)}. +\pnum +\returns \tcode{static_cast<\placeholdernc{SM-CAT}(BiIter)>(lhs.compare(rhs) <=> 0)}. \end{itemdescr} \indexlibrarymember{operator==}{sub_match}% @@ -1840,7 +1869,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns +\pnum +\returns \begin{codeblock} static_cast<@\placeholdernc{SM-CAT}@(BiIter)>(lhs.compare( typename sub_match::string_type(rhs.data(), rhs.size())) @@ -1857,7 +1887,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{lhs.compare(rhs) == 0}. +\pnum +\returns \tcode{lhs.compare(rhs) == 0}. \end{itemdescr} \indexlibrarymember{sub_match}{operator<=>}% @@ -1868,7 +1899,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns +\pnum +\returns \tcode{static_cast<\placeholdernc{SM-CAT}(BiIter)>(lhs.compare(rhs) <=> 0)}. \end{itemdescr} @@ -1911,7 +1943,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{os << m.str()}. +\pnum +\returns \tcode{os << m.str()}. \end{itemdescr} \rSec1[re.results]{Class template \tcode{match_results}} @@ -2136,7 +2169,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns One plus the number of marked sub-expressions in the +\pnum +\returns One plus the number of marked sub-expressions in the regular expression that was matched if \tcode{*this} represents the result of a successful match. Otherwise returns \tcode{0}. \begin{note} The state of a \tcode{match_results} object can be modified @@ -2152,7 +2186,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The maximum number of \tcode{sub_match} elements that can be +\pnum +\returns The maximum number of \tcode{sub_match} elements that can be stored in \tcode{*this}. \end{itemdescr} @@ -2162,7 +2197,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{size() == 0}. +\pnum +\returns \tcode{size() == 0}. \end{itemdescr} \rSec2[re.results.acc]{Element access} @@ -2262,7 +2298,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A starting iterator that enumerates over all the +\pnum +\returns A starting iterator that enumerates over all the sub-expressions stored in \tcode{*this}. \end{itemdescr} @@ -2273,7 +2310,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns A terminating iterator that enumerates over all the +\pnum +\returns A terminating iterator that enumerates over all the sub-expressions stored in \tcode{*this}. \end{itemdescr} @@ -2390,13 +2428,16 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Swaps the contents of the two sequences. +\pnum +\effects Swaps the contents of the two sequences. -\pnum\ensures \tcode{*this} contains the sequence of matched +\pnum +\ensures \tcode{*this} contains the sequence of matched sub-expressions that were in \tcode{that}, \tcode{that} contains the sequence of matched sub-expressions that were in \tcode{*this}. -\pnum\complexity Constant time. +\pnum +\complexity Constant time. \end{itemdescr} \indexlibrarymember{match_results}{swap}% @@ -2406,7 +2447,8 @@ match_results& m2); \end{itemdecl} -\pnum\effects As if by \tcode{m1.swap(m2)}. +\pnum +\effects As if by \tcode{m1.swap(m2)}. \rSec2[re.results.nonmember]{Non-member functions} @@ -2799,7 +2841,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{regex_search(s.begin(), s.end(), e, flags)}. +\pnum +\returns \tcode{regex_search(s.begin(), s.end(), e, flags)}. \end{itemdescr} \rSec2[re.alg.replace]{\tcode{regex_replace}} @@ -2870,7 +2913,8 @@ found. If \tcode{flags \& regex_constants::format_first_only} is nonzero, then only the first match found is replaced. -\pnum\returns \tcode{out}. +\pnum +\returns \tcode{out}. \end{itemdescr} \indexlibrary{\idxcode{regex_replace}}% @@ -2890,7 +2934,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs an empty string \tcode{result} of +\pnum +\effects Constructs an empty string \tcode{result} of type \tcode{basic_string} and calls: \begin{codeblock} regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, flags); @@ -3013,7 +3058,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs an end-of-sequence iterator. +\pnum +\effects Constructs an end-of-sequence iterator. \end{itemdescr} \indexlibrary{\idxcode{regex_iterator}!constructor}% @@ -3024,7 +3070,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Initializes \tcode{begin} and \tcode{end} to +\pnum +\effects Initializes \tcode{begin} and \tcode{end} to \tcode{a} and \tcode{b}, respectively, sets \tcode{pregex} to \tcode{addressof(re)}, sets \tcode{flags} to \tcode{m}, then calls \tcode{regex_search(begin, end, match, *pregex, flags)}. If this @@ -3061,7 +3108,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{match}. +\pnum +\returns \tcode{match}. \end{itemdescr} \indexlibrarymember{operator->}{regex_iterator}% @@ -3070,7 +3118,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{addressof(match)}. +\pnum +\returns \tcode{addressof(match)}. \end{itemdescr} \rSec3[re.regiter.incr]{Increment} @@ -3140,7 +3189,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects As if by: \begin{codeblock} regex_iterator tmp = *this; @@ -3388,7 +3438,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{*result}. +\pnum +\returns \tcode{*result}. \end{itemdescr} @@ -3398,7 +3449,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{result}. +\pnum +\returns \tcode{result}. \end{itemdescr} @@ -3437,7 +3489,8 @@ \pnum Otherwise, sets \tcode{*this} to an end-of-sequence iterator. -\pnum\returns \tcode{*this} +\pnum +\returns \tcode{*this} \end{itemdescr} \indexlibrarymember{regex_token_iterator}{operator++}% @@ -3446,9 +3499,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a copy \tcode{tmp} of \tcode{*this}, then calls \tcode{++(*this)}. +\pnum +\effects Constructs a copy \tcode{tmp} of \tcode{*this}, then calls \tcode{++(*this)}. -\pnum\returns \tcode{tmp}. +\pnum +\returns \tcode{tmp}. \end{itemdescr} \rSec1[re.grammar]{Modified ECMAScript regular expression grammar} diff --git a/source/strings.tex b/source/strings.tex index 612d8236df..50a65f70aa 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -3813,7 +3813,8 @@ \tcode{wstring\{str, len\}}. \end{itemdescr} -\pnum \begin{note} +\pnum +\begin{note} The same suffix \tcode{s} is used for \tcode{chrono::duration} literals denoting seconds but there is no conflict, since duration suffixes apply to numbers and string literal suffixes apply to character array literals. \end{note} diff --git a/source/support.tex b/source/support.tex index 6a7d4d58eb..997e9cc1d7 100644 --- a/source/support.tex +++ b/source/support.tex @@ -345,9 +345,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum \constraints \tcode{is_integral_v} is \tcode{true}. +\pnum +\constraints \tcode{is_integral_v} is \tcode{true}. -\pnum \effects Equivalent to: +\pnum +\effects Equivalent to: \tcode{return b = b << shift;} \end{itemdescr} @@ -358,9 +360,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum \constraints \tcode{is_integral_v} is \tcode{true}. +\pnum +\constraints \tcode{is_integral_v} is \tcode{true}. -\pnum \effects Equivalent to: +\pnum +\effects Equivalent to: \begin{codeblock} return static_cast(static_cast( static_cast(b) << shift)); @@ -374,9 +378,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum \constraints \tcode{is_integral_v} is \tcode{true}. +\pnum +\constraints \tcode{is_integral_v} is \tcode{true}. -\pnum \effects Equivalent to: +\pnum +\effects Equivalent to: \tcode{return b >> shift;} \end{itemdescr} @@ -387,9 +393,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum \constraints \tcode{is_integral_v} is \tcode{true}. +\pnum +\constraints \tcode{is_integral_v} is \tcode{true}. -\pnum \effects Equivalent to: +\pnum +\effects Equivalent to: \begin{codeblock} return static_cast(static_cast( static_cast(b) >> shift)); @@ -402,7 +410,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \effects Equivalent to: \tcode{return l = l | r;} +\pnum +\effects Equivalent to: \tcode{return l = l | r;} \end{itemdescr} \indexlibrarymember{operator"|}{byte}% @@ -411,7 +420,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \effects Equivalent to: +\pnum +\effects Equivalent to: \begin{codeblock} return static_cast(static_cast(static_cast(l) | static_cast(r))); @@ -424,7 +434,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \effects Equivalent to: \tcode{return l = l \& r;} +\pnum +\effects Equivalent to: \tcode{return l = l \& r;} \end{itemdescr} \indexlibrarymember{operator\&}{byte}% @@ -433,7 +444,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \effects Equivalent to: +\pnum +\effects Equivalent to: \begin{codeblock} return static_cast(static_cast(static_cast(l) & static_cast(r))); @@ -446,7 +458,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \effects Equivalent to: \tcode{return l = l \caret{} r;} +\pnum +\effects Equivalent to: \tcode{return l = l \caret{} r;} \end{itemdescr} \indexlibrarymember{operator\caret}{byte}% @@ -455,7 +468,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \effects Equivalent to: +\pnum +\effects Equivalent to: \begin{codeblock} return static_cast(static_cast(static_cast(l) ^ static_cast(r))); @@ -468,7 +482,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \effects Equivalent to: +\pnum +\effects Equivalent to: \begin{codeblock} return static_cast(static_cast( ~static_cast(b))); @@ -482,9 +497,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum \constraints \tcode{is_integral_v} is \tcode{true}. +\pnum +\constraints \tcode{is_integral_v} is \tcode{true}. -\pnum \effects Equivalent to: \tcode{return static_cast(b);} +\pnum +\effects Equivalent to: \tcode{return static_cast(b);} \end{itemdescr} \rSec1[support.limits]{Implementation properties} @@ -1039,7 +1056,8 @@ \pnum For integer types, the number of non-sign bits in the representation. -\pnum For floating-point types, the number of \tcode{radix} digits in the +\pnum +For floating-point types, the number of \tcode{radix} digits in the mantissa.\footnote{Equivalent to \tcode{FLT_MANT_DIG}, \tcode{DBL_MANT_DIG}, \tcode{LDBL_MANT_DIG}.} \end{itemdescr} @@ -5434,7 +5452,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{x.address() == y.address()}. +\pnum +\returns \tcode{x.address() == y.address()}. \end{itemdescr} \indexlibrarymember{operator<=>}{coroutine_handle}% @@ -5443,7 +5462,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{compare_three_way()(x.address(), y.address())}. +\pnum +\returns \tcode{compare_three_way()(x.address(), y.address())}. \end{itemdescr} \rSec3[coroutine.handle.hash]{Hash support} @@ -5454,7 +5474,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum The specialization is enabled\iref{unord.hash}. +\pnum +The specialization is enabled\iref{unord.hash}. \end{itemdescr} \rSec2[coroutine.noop]{No-op coroutines} @@ -5467,7 +5488,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum The class \tcode{noop_coroutine_promise} defines the promise type for +\pnum +The class \tcode{noop_coroutine_promise} defines the promise type for the coroutine referred to by \tcode{noop_coroutine_handle}\iref{coroutine.syn}. \end{itemdescr} @@ -5508,7 +5530,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{true}. +\pnum +\returns \tcode{true}. \end{itemdescr} \indexlibrarymember{done}{coroutine_handle}% @@ -5517,7 +5540,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{false}. +\pnum +\returns \tcode{false}. \end{itemdescr} \rSec4[coroutine.handle.noop.resumption]{Resumption} @@ -5532,7 +5556,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \effects None. +\pnum +\effects None. \pnum \remarks @@ -5549,7 +5574,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum \returns A reference to the promise object associated with this +\pnum +\returns A reference to the promise object associated with this coroutine handle. \end{itemdescr} @@ -5561,9 +5587,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum \returns \tcode{ptr}. +\pnum +\returns \tcode{ptr}. -\pnum \remarks A \tcode{noop_coroutine_handle}'s \tcode{ptr} is always a +\pnum +\remarks A \tcode{noop_coroutine_handle}'s \tcode{ptr} is always a non-null pointer value. \end{itemdescr} @@ -5575,10 +5603,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum \returns A handle to a coroutine that has no observable effects +\pnum +\returns A handle to a coroutine that has no observable effects when resumed or destroyed. -\pnum \remarks A handle returned from \tcode{noop_coroutine} may or may not +\pnum +\remarks A handle returned from \tcode{noop_coroutine} may or may not compare equal to a handle returned from another invocation of \tcode{noop_coroutine}. \end{itemdescr} diff --git a/source/templates.tex b/source/templates.tex index c9bd9c8c15..81952f4bb4 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -1371,7 +1371,8 @@ \end{codeblock} \end{example} -\pnum A \grammarterm{template-argument} matches a template +\pnum +A \grammarterm{template-argument} matches a template \grammarterm{template-parameter} \tcode{P} when \tcode{P} is at least as specialized as the \grammarterm{template-argument} \tcode{A}. In this comparison, if \tcode{P} is unconstrained, diff --git a/source/threads.tex b/source/threads.tex index 0508835627..22b15a5fed 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -1030,7 +1030,8 @@ } \end{codeblock} -\pnum An object of type \tcode{thread::id} provides a unique identifier for +\pnum +An object of type \tcode{thread::id} provides a unique identifier for each thread of execution and a single distinct value for all \tcode{thread} objects that do not represent a thread of execution\iref{thread.thread.class}. Each thread of execution has an @@ -1053,9 +1054,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs an object of type \tcode{id}. +\pnum +\effects Constructs an object of type \tcode{id}. -\pnum\ensures The constructed object does not represent a thread of execution. +\pnum +\ensures The constructed object does not represent a thread of execution. \end{itemdescr} \indexlibrarymember{operator==}{thread::id}% @@ -1064,7 +1067,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{true} only if \tcode{x} and \tcode{y} represent the same +\pnum +\returns \tcode{true} only if \tcode{x} and \tcode{y} represent the same thread of execution or neither \tcode{x} nor \tcode{y} represents a thread of execution. \end{itemdescr} @@ -1096,13 +1100,15 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Inserts an unspecified text representation of \tcode{id} into +\pnum +\effects Inserts an unspecified text representation of \tcode{id} into \tcode{out}. For two objects of type \tcode{thread::id} \tcode{x} and \tcode{y}, if \tcode{x == y} the \tcode{thread::id} objects have the same text representation and if \tcode{x != y} the \tcode{thread::id} objects have distinct text representations. -\pnum\returns \tcode{out}. +\pnum +\returns \tcode{out}. \end{itemdescr} \indexlibrary{\idxcode{hash}!\idxcode{thread::id}}% @@ -1111,7 +1117,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum The specialization is enabled\iref{unord.hash}. +\pnum +The specialization is enabled\iref{unord.hash}. \end{itemdescr} \rSec3[thread.thread.constr]{Constructors} @@ -1122,9 +1129,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{thread} object that does not represent a thread of execution. +\pnum +\effects Constructs a \tcode{thread} object that does not represent a thread of execution. -\pnum\ensures \tcode{get_id() == id()}. +\pnum +\ensures \tcode{get_id() == id()}. \end{itemdescr} \indexlibrary{\idxcode{thread}!constructor}% @@ -1168,14 +1177,18 @@ termi\-nates with an uncaught exception, \tcode{terminate} shall be called. -\pnum\sync The completion of the invocation of the constructor +\pnum +\sync The completion of the invocation of the constructor synchronizes with the beginning of the invocation of the copy of \tcode{f}. -\pnum\ensures \tcode{get_id() != id()}. \tcode{*this} represents the newly started thread. +\pnum +\ensures \tcode{get_id() != id()}. \tcode{*this} represents the newly started thread. -\pnum\throws \tcode{system_error} if unable to start the new thread. +\pnum +\throws \tcode{system_error} if unable to start the new thread. -\pnum\errors +\pnum +\errors \begin{itemize} \item \tcode{resource_unavailable_try_again} --- the system lacked the necessary resources to create another thread, or the system-imposed limit on the number of @@ -1304,12 +1317,15 @@ thread of execution. When the thread previously represented by \tcode{*this} ends execution, the implementation shall release any owned resources. -\pnum\ensures \tcode{get_id() == id()}. +\pnum +\ensures \tcode{get_id() == id()}. -\pnum\throws \tcode{system_error} when +\pnum +\throws \tcode{system_error} when an exception is required\iref{thread.req.exception}. -\pnum \errors +\pnum +\errors \begin{itemize} \item \tcode{no_such_process} --- if the thread is not valid. \item \tcode{invalid_argument} --- if the thread is not joinable. @@ -1350,7 +1366,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects As if by \tcode{x.swap(y)}. +\pnum +\effects As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec2[thread.jthread.class]{Class \tcode{jthread}} @@ -1478,7 +1495,8 @@ \sync The completion of the invocation of the constructor synchronizes with the beginning of the invocation of the copy of \tcode{f}. -\pnum\ensures +\pnum +\ensures \tcode{get_id() != id()} is \tcode{true} and \tcode{ssource.stop_possible()} is \tcode{true} and \tcode{*this} represents the newly started thread. @@ -1487,7 +1505,8 @@ because it cannot replace this stop token. \end{note} -\pnum\throws \tcode{system_error} if unable to start the new thread. +\pnum +\throws \tcode{system_error} if unable to start the new thread. \pnum \errors @@ -1638,7 +1657,8 @@ \throws \tcode{system_error} when an exception is required\iref{thread.req.exception}. -\pnum \errors +\pnum +\errors \begin{itemize} \item \tcode{no_such_process} --- if the thread is not valid. \item \tcode{invalid_argument} --- if the thread is not joinable. @@ -1926,7 +1946,8 @@ \throws \tcode{system_error} when an exception is required\iref{thread.req.exception}. -\pnum \errors +\pnum +\errors \begin{itemize} \item \tcode{operation_not_permitted} --- if the thread does not have the privilege to perform the operation. @@ -2150,7 +2171,8 @@ \sync If \tcode{try_lock_for()} returns \tcode{true}, prior \tcode{unlock()} operations on the same object \term{synchronize with}\iref{intro.multithread} this operation. -\pnum\throws Timeout-related exceptions\iref{thread.req.timing}. +\pnum +\throws Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} \pnum @@ -2173,7 +2195,8 @@ be obtained if the lock is available, but implementations are expected to make a strong effort to do so. \end{note} -\pnum\returntype \tcode{bool}. +\pnum +\returntype \tcode{bool}. \pnum \returns \tcode{true} if ownership was obtained, otherwise \tcode{false}. @@ -2183,7 +2206,8 @@ operations on the same object \term{synchronize with}\iref{intro.multithread} this operation. -\pnum\throws Timeout-related exceptions\iref{thread.req.timing}. +\pnum +\throws Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} \rSec4[thread.timedmutex.class]{Class \tcode{timed_mutex}} @@ -2987,7 +3011,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\ensures \tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}. +\pnum +\ensures \tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}. \end{itemdescr} \indexlibrarymember{operator=}{unique_lock}% @@ -2996,14 +3021,17 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects If \tcode{owns} calls \tcode{pm->unlock()}. +\pnum +\effects If \tcode{owns} calls \tcode{pm->unlock()}. -\pnum\ensures \tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}. +\pnum +\ensures \tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}. \pnum \begin{note} With a recursive mutex it is possible for both \tcode{*this} and \tcode{u} to own the same mutex before the assignment. In this case, \tcode{*this} will own the mutex after the assignment and \tcode{u} will not. \end{note} -\pnum\throws Nothing. +\pnum +\throws Nothing. \end{itemdescr} @@ -3013,7 +3041,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects If \tcode{owns} calls \tcode{pm->unlock()}. +\pnum +\effects If \tcode{owns} calls \tcode{pm->unlock()}. \end{itemdescr} \rSec4[thread.lock.unique.locking]{Locking} @@ -3057,7 +3086,8 @@ \pnum \effects As if by \tcode{pm->try_lock()}. -\pnum\returns The value returned by the call to \tcode{try_lock()}. +\pnum +\returns The value returned by the call to \tcode{try_lock()}. \pnum \ensures \tcode{owns == res}, where \tcode{res} is the value returned by @@ -3149,14 +3179,18 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects As if by \tcode{pm->unlock()}. +\pnum +\effects As if by \tcode{pm->unlock()}. -\pnum\ensures \tcode{owns == false}. +\pnum +\ensures \tcode{owns == false}. -\pnum\throws \tcode{system_error} when +\pnum +\throws \tcode{system_error} when an exception is required\iref{thread.req.exception}. -\pnum \errors +\pnum +\errors \begin{itemize} \item \tcode{operation_not_permitted} --- if on entry \tcode{owns} is \tcode{false}. \end{itemize} @@ -3170,7 +3204,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Swaps the data members of \tcode{*this} and \tcode{u}. +\pnum +\effects Swaps the data members of \tcode{*this} and \tcode{u}. \end{itemdescr} \indexlibrarymember{release}{unique_lock}% @@ -3179,9 +3214,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The previous value of \tcode{pm}. +\pnum +\returns The previous value of \tcode{pm}. -\pnum\ensures \tcode{pm == 0} and \tcode{owns == false}. +\pnum +\ensures \tcode{pm == 0} and \tcode{owns == false}. \end{itemdescr} \indexlibrarymember{swap}{unique_lock}% @@ -3191,7 +3228,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects As if by \tcode{x.swap(y)}. +\pnum +\effects As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec4[thread.lock.unique.obs]{Observers} @@ -3202,7 +3240,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{owns}. +\pnum +\returns \tcode{owns}. \end{itemdescr} \indexlibrarymember{operator bool}{unique_lock}% @@ -3211,7 +3250,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{owns}. +\pnum +\returns \tcode{owns}. \end{itemdescr} \indexlibrarymember{mutex}{unique_lock}% @@ -3220,7 +3260,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{pm}. +\pnum +\returns \tcode{pm}. \end{itemdescr} \rSec3[thread.lock.shared]{Class template \tcode{shared_lock}} @@ -3733,11 +3774,14 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs an object of type \tcode{once_flag}. +\pnum +\effects Constructs an object of type \tcode{once_flag}. -\pnum\sync The construction of a \tcode{once_flag} object is not synchronized. +\pnum +\sync The construction of a \tcode{once_flag} object is not synchronized. -\pnum\ensures The object's internal state is set to indicate to an invocation of +\pnum +\ensures The object's internal state is set to indicate to an invocation of \tcode{call_once} with the object as its initial argument that no function has been called. \end{itemdescr} @@ -3780,7 +3824,8 @@ the start of the next one in this total order; and the returning execution synchronizes with the return from all passive executions. -\pnum\throws \tcode{system_error} when +\pnum +\throws \tcode{system_error} when an exception is required\iref{thread.req.exception}, or any exception thrown by \tcode{func}. \pnum @@ -3993,7 +4038,8 @@ using the overloads of \tcode{wait}, \tcode{wait_for}, or \tcode{wait_until} that take a predicate. \end{note} -\pnum\effects Destroys the object. +\pnum +\effects Destroys the object. \end{itemdescr} \indexlibrarymember{notify_one}{condition_variable}% @@ -4002,7 +4048,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects If any threads are blocked waiting for \tcode{*this}, unblocks one of those threads. +\pnum +\effects If any threads are blocked waiting for \tcode{*this}, unblocks one of those threads. \end{itemdescr} \indexlibrarymember{notify_all}{condition_variable}% @@ -4011,7 +4058,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Unblocks all threads that are blocked waiting for \tcode{*this}. +\pnum +\effects Unblocks all threads that are blocked waiting for \tcode{*this}. \end{itemdescr} \indexlibrarymember{wait}{condition_variable}% @@ -4030,7 +4078,8 @@ \tcode{wait_for}, or \tcode{wait_until}) threads. \end{itemize} -\pnum\effects +\pnum +\effects \begin{itemize} \item Atomically calls \tcode{lock.unlock()} and blocks on \tcode{*this}. \item When unblocked, calls \tcode{lock.lock()} (possibly blocking on the lock), then returns. @@ -4048,7 +4097,8 @@ \ensures \tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} is locked by the calling thread. -\pnum\throws Nothing. +\pnum +\throws Nothing. \end{itemdescr} @@ -4143,7 +4193,8 @@ the absolute timeout\iref{thread.req.timing} specified by \tcode{abs_time} expired, otherwise \tcode{cv_status::no_timeout}. -\pnum\throws Timeout-related +\pnum +\throws Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} @@ -4389,7 +4440,8 @@ using the overloads of \tcode{wait}, \tcode{wait_for}, or \tcode{wait_until} that take a predicate. \end{note} -\pnum\effects Destroys the object. +\pnum +\effects Destroys the object. \end{itemdescr} \indexlibrarymember{notify_one}{condition_variable_any}% @@ -4398,7 +4450,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects If any threads are blocked waiting for \tcode{*this}, unblocks one of those threads. +\pnum +\effects If any threads are blocked waiting for \tcode{*this}, unblocks one of those threads. \end{itemdescr} \indexlibrarymember{notify_all}{condition_variable_any}% @@ -4407,7 +4460,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Unblocks all threads that are blocked waiting for \tcode{*this}. +\pnum +\effects Unblocks all threads that are blocked waiting for \tcode{*this}. \end{itemdescr} \rSec3[thread.condvarany.wait]{Noninterruptible waits} @@ -4434,9 +4488,11 @@ shall be called\iref{except.terminate}. \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} -\pnum\ensures \tcode{lock} is locked by the calling thread. +\pnum +\ensures \tcode{lock} is locked by the calling thread. -\pnum\throws Nothing. +\pnum +\throws Nothing. \end{itemdescr} @@ -4462,7 +4518,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects \begin{itemize} \item diff --git a/source/utilities.tex b/source/utilities.tex index cb55f49a86..c2e9689400 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6251,7 +6251,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum The specialization is enabled\iref{unord.hash}. +\pnum +The specialization is enabled\iref{unord.hash}. \end{itemdescr} @@ -7018,7 +7019,8 @@ \pnum \throws Nothing. -\pnum \begin{note} It is expected that calls to \tcode{declare_reachable(p)} will consume +\pnum +\begin{note} It is expected that calls to \tcode{declare_reachable(p)} will consume a small amount of memory in addition to that occupied by the referenced object until the matching call to \tcode{undeclare_reachable(p)} is encountered. Long running programs should arrange that calls are matched. \end{note} \end{itemdescr} @@ -9974,9 +9976,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs an empty \tcode{shared_ptr} object. +\pnum +\effects Constructs an empty \tcode{shared_ptr} object. -\pnum\ensures \tcode{use_count() == 0 \&\& get() == nullptr}. +\pnum +\ensures \tcode{use_count() == 0 \&\& get() == nullptr}. \end{itemdescr} \indexlibrary{\idxcode{shared_ptr}!constructor}% @@ -9985,13 +9989,15 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires \tcode{Y} shall be a complete type. The expression +\pnum +\requires \tcode{Y} shall be a complete type. The expression \tcode{delete[] p}, when \tcode{T} is an array type, or \tcode{delete p}, when \tcode{T} is not an array type, shall have well-defined behavior, and shall not throw exceptions. -\pnum\effects When \tcode{T} is not an array type, +\pnum +\effects When \tcode{T} is not an array type, constructs a \tcode{shared_ptr} object that owns the pointer \tcode{p}. Otherwise, constructs a \tcode{shared_ptr} @@ -10002,12 +10008,15 @@ If an exception is thrown, \tcode{delete p} is called when \tcode{T} is not an array type, \tcode{delete[] p} otherwise. -\pnum\ensures \tcode{use_count() == 1 \&\& get() == p}. +\pnum +\ensures \tcode{use_count() == 1 \&\& get() == p}. -\pnum\throws \tcode{bad_alloc}, or an \impldef{exception type when \tcode{shared_ptr} +\pnum +\throws \tcode{bad_alloc}, or an \impldef{exception type when \tcode{shared_ptr} constructor fails} exception when a resource other than memory could not be obtained. -\pnum\remarks When \tcode{T} is an array type, +\pnum +\remarks When \tcode{T} is an array type, this constructor shall not participate in overload resolution unless the expression \tcode{delete[] p} is well-formed and either \tcode{T} is \tcode{U[N]} and \tcode{Y(*)[N]} is convertible to \tcode{T*}, or @@ -10027,14 +10036,16 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires Construction of \tcode{d} and a deleter of type \tcode{D} +\pnum +\requires Construction of \tcode{d} and a deleter of type \tcode{D} initialized with \tcode{std::move(d)} shall not throw exceptions. The expression \tcode{d(p)} shall have well-defined behavior and shall not throw exceptions. \tcode{A} shall meet the \oldconcept{Allocator} requirements (\tref{cpp17.allocator}). -\pnum\effects Constructs a \tcode{shared_ptr} object that owns the +\pnum +\effects Constructs a \tcode{shared_ptr} object that owns the object \tcode{p} and the deleter \tcode{d}. When \tcode{T} is not an array type, the first and second constructors enable \tcode{shared_from_this} with \tcode{p}. @@ -10042,13 +10053,16 @@ allocate memory for internal use. If an exception is thrown, \tcode{d(p)} is called. -\pnum\ensures \tcode{use_count() == 1 \&\& get() == p}. +\pnum +\ensures \tcode{use_count() == 1 \&\& get() == p}. -\pnum\throws \tcode{bad_alloc}, or an \impldef{exception type when \tcode{shared_ptr} +\pnum +\throws \tcode{bad_alloc}, or an \impldef{exception type when \tcode{shared_ptr} constructor fails} exception when a resource other than memory could not be obtained. -\pnum\remarks +\pnum +\remarks When \tcode{T} is an array type, this constructor shall not participate in overload resolution unless \tcode{is_move_constructible_v} is \tcode{true}, @@ -10096,15 +10110,18 @@ \end{itemdecl} \begin{itemdescr} -\pnum\remarks +\pnum +\remarks The second constructor shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*}. -\pnum\effects If \tcode{r} is empty, constructs +\pnum +\effects If \tcode{r} is empty, constructs an empty \tcode{shared_ptr} object; otherwise, constructs a \tcode{shared_ptr} object that shares ownership with \tcode{r}. -\pnum\ensures \tcode{get() == r.get() \&\& use_count() == r.use_count()}. +\pnum +\ensures \tcode{get() == r.get() \&\& use_count() == r.use_count()}. \end{itemdescr} \indexlibrary{\idxcode{shared_ptr}!constructor}% @@ -10133,15 +10150,19 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{shared_ptr} object that shares ownership with +\pnum +\effects Constructs a \tcode{shared_ptr} object that shares ownership with \tcode{r} and stores a copy of the pointer stored in \tcode{r}. If an exception is thrown, the constructor has no effect. -\pnum\ensures \tcode{use_count() == r.use_count()}. +\pnum +\ensures \tcode{use_count() == r.use_count()}. -\pnum\throws \tcode{bad_weak_ptr} when \tcode{r.expired()}. +\pnum +\throws \tcode{bad_weak_ptr} when \tcode{r.expired()}. -\pnum\remarks This constructor shall not participate in overload resolution unless +\pnum +\remarks This constructor shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*}. \end{itemdescr} @@ -10152,7 +10173,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\remarks This constructor shall not participate in overload resolution +\pnum +\remarks This constructor shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*} and \tcode{unique_ptr::pointer} is convertible to \tcode{element_type*}. @@ -10172,7 +10194,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects \begin{itemize} \item If \tcode{*this} is empty or shares ownership with another \tcode{shared_ptr} instance (\tcode{use_count() > 1}), there are no side effects. @@ -10204,11 +10227,14 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{shared_ptr(r).swap(*this)}. +\pnum +\effects Equivalent to \tcode{shared_ptr(r).swap(*this)}. -\pnum\returns \tcode{*this}. +\pnum +\returns \tcode{*this}. -\pnum \begin{note} +\pnum +\begin{note} The use count updates caused by the temporary object construction and destruction are not observable side effects, so the implementation may meet the effects (and the @@ -10259,7 +10285,8 @@ \begin{itemdescr} -\pnum\effects Exchanges the contents of \tcode{*this} and \tcode{r}. +\pnum +\effects Exchanges the contents of \tcode{*this} and \tcode{r}. \end{itemdescr} \indexlibrarymember{reset}{shared_ptr}% @@ -10268,7 +10295,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{shared_ptr().swap(*this)}. +\pnum +\effects Equivalent to \tcode{shared_ptr().swap(*this)}. \end{itemdescr} \indexlibrarymember{reset}{shared_ptr}% @@ -10277,7 +10305,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{shared_ptr(p).swap(*this)}. +\pnum +\effects Equivalent to \tcode{shared_ptr(p).swap(*this)}. \end{itemdescr} \indexlibrarymember{reset}{shared_ptr}% @@ -10286,7 +10315,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{shared_ptr(p, d).swap(*this)}. +\pnum +\effects Equivalent to \tcode{shared_ptr(p, d).swap(*this)}. \end{itemdescr} \indexlibrarymember{reset}{shared_ptr}% @@ -10306,7 +10336,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The stored pointer. +\pnum +\returns The stored pointer. \end{itemdescr} \indexlibrarymember{operator*}{shared_ptr}% @@ -10315,11 +10346,14 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires \tcode{get() != 0}. +\pnum +\requires \tcode{get() != 0}. -\pnum\returns \tcode{*get()}. +\pnum +\returns \tcode{*get()}. -\pnum\remarks When \tcode{T} is an array type or \cv{}~\tcode{void}, +\pnum +\remarks When \tcode{T} is an array type or \cv{}~\tcode{void}, it is unspecified whether this member function is declared. If it is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the @@ -10332,11 +10366,14 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires \tcode{get() != 0}. +\pnum +\requires \tcode{get() != 0}. -\pnum\returns \tcode{get()}. +\pnum +\returns \tcode{get()}. -\pnum\remarks When \tcode{T} is an array type, +\pnum +\remarks When \tcode{T} is an array type, it is unspecified whether this member function is declared. If it is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the definition) @@ -10349,18 +10386,22 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires \tcode{get() != 0 \&\& i >= 0}. +\pnum +\requires \tcode{get() != 0 \&\& i >= 0}. If \tcode{T} is \tcode{U[N]}, \tcode{i < N}. -\pnum\returns \tcode{get()[i]}. +\pnum +\returns \tcode{get()[i]}. -\pnum\remarks When \tcode{T} is not an array type, +\pnum +\remarks When \tcode{T} is not an array type, it is unspecified whether this member function is declared. If it is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the definition) of the function shall be well-formed. -\pnum\throws Nothing. +\pnum +\throws Nothing. \end{itemdescr} \indexlibrarymember{use_count}{shared_ptr}% @@ -10369,19 +10410,24 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The number of \tcode{shared_ptr} objects, \tcode{*this} included, +\pnum +\returns The number of \tcode{shared_ptr} objects, \tcode{*this} included, that share ownership with \tcode{*this}, or \tcode{0} when \tcode{*this} is empty. -\pnum\sync None. +\pnum +\sync None. -\pnum \begin{note} \tcode{get() == nullptr} +\pnum +\begin{note} \tcode{get() == nullptr} does not imply a specific return value of \tcode{use_count()}. \end{note} -\pnum \begin{note} \tcode{weak_ptr::lock()} +\pnum +\begin{note} \tcode{weak_ptr::lock()} can affect the return value of \tcode{use_count()}. \end{note} -\pnum \begin{note} When multiple threads +\pnum +\begin{note} When multiple threads can affect the return value of \tcode{use_count()}, the result should be treated as approximate. In particular, \tcode{use_count() == 1} does not imply that accesses through @@ -10394,7 +10440,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{get() != 0}. +\pnum +\returns \tcode{get() != 0}. \end{itemdescr} \indexlibrarymember{owner_before}{shared_ptr}% @@ -10842,7 +10889,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{a.swap(b)}. +\pnum +\effects Equivalent to \tcode{a.swap(b)}. \end{itemdescr} \rSec3[util.smartptr.shared.cast]{Casts} @@ -10953,7 +11001,8 @@ \requires The expression \tcode{reinterpret_cast((U*)nullptr)} shall be well-formed. -\pnum\returns +\pnum +\returns \begin{codeblock} shared_ptr(@\placeholder{R}@, reinterpret_cast::element_type*>(r.get())) \end{codeblock} @@ -10977,7 +11026,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns If \tcode{p} owns a deleter \tcode{d} of type cv-unqualified +\pnum +\returns If \tcode{p} owns a deleter \tcode{d} of type cv-unqualified \tcode{D}, returns \tcode{addressof(d)}; otherwise returns \tcode{nullptr}. The returned pointer remains valid as long as there exists a \tcode{shared_ptr} instance @@ -10996,9 +11046,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects As if by: \tcode{os <{}< p.get();} +\pnum +\effects As if by: \tcode{os <{}< p.get();} -\pnum\returns \tcode{os}. +\pnum +\returns \tcode{os}. \end{itemdescr} \rSec2[util.smartptr.weak]{Class template \tcode{weak_ptr}} @@ -11077,9 +11129,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs an empty \tcode{weak_ptr} object. +\pnum +\effects Constructs an empty \tcode{weak_ptr} object. -\pnum\ensures \tcode{use_count() == 0}. +\pnum +\ensures \tcode{use_count() == 0}. \end{itemdescr} \indexlibrary{\idxcode{weak_ptr}!constructor}% @@ -11090,15 +11144,18 @@ \end{itemdecl} \begin{itemdescr} -\pnum\remarks The second and third constructors shall not participate in +\pnum +\remarks The second and third constructors shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*}. -\pnum\effects If \tcode{r} is empty, constructs +\pnum +\effects If \tcode{r} is empty, constructs an empty \tcode{weak_ptr} object; otherwise, constructs a \tcode{weak_ptr} object that shares ownership with \tcode{r} and stores a copy of the pointer stored in \tcode{r}. -\pnum\ensures \tcode{use_count() == r.use_count()}. +\pnum +\ensures \tcode{use_count() == r.use_count()}. \end{itemdescr} \indexlibrary{\idxcode{weak_ptr}!constructor}% @@ -11108,12 +11165,15 @@ \end{itemdecl} \begin{itemdescr} -\pnum\remarks The second constructor shall not participate in overload resolution unless +\pnum +\remarks The second constructor shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*}. -\pnum\effects Move constructs a \tcode{weak_ptr} instance from \tcode{r}. +\pnum +\effects Move constructs a \tcode{weak_ptr} instance from \tcode{r}. -\pnum\ensures \tcode{*this} shall contain the old value of \tcode{r}. +\pnum +\ensures \tcode{*this} shall contain the old value of \tcode{r}. \tcode{r} shall be empty. \tcode{r.use_count() == 0}. \end{itemdescr} @@ -11125,7 +11185,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Destroys this \tcode{weak_ptr} object but has no +\pnum +\effects Destroys this \tcode{weak_ptr} object but has no effect on the object its stored pointer points to. \end{itemdescr} @@ -11139,12 +11200,15 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{weak_ptr(r).swap(*this)}. +\pnum +\effects Equivalent to \tcode{weak_ptr(r).swap(*this)}. -\pnum\remarks The implementation may meet the effects (and the +\pnum +\remarks The implementation may meet the effects (and the implied guarantees) via different means, without creating a temporary object. -\pnum\returns \tcode{*this}. +\pnum +\returns \tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{weak_ptr}% @@ -11154,9 +11218,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{weak_ptr(std::move(r)).swap(*this)}. +\pnum +\effects Equivalent to \tcode{weak_ptr(std::move(r)).swap(*this)}. -\pnum\returns \tcode{*this}. +\pnum +\returns \tcode{*this}. \end{itemdescr} \rSec3[util.smartptr.weak.mod]{Modifiers} @@ -11166,7 +11232,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Exchanges the contents of \tcode{*this} and \tcode{r}. +\pnum +\effects Exchanges the contents of \tcode{*this} and \tcode{r}. \end{itemdescr} \indexlibrarymember{reset}{weak_ptr}% @@ -11175,7 +11242,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{weak_ptr().swap(*this)}. +\pnum +\effects Equivalent to \tcode{weak_ptr().swap(*this)}. \end{itemdescr} \rSec3[util.smartptr.weak.obs]{Observers} @@ -11185,7 +11253,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{0} if \tcode{*this} is empty; +\pnum +\returns \tcode{0} if \tcode{*this} is empty; otherwise, the number of \tcode{shared_ptr} instances that share ownership with \tcode{*this}. \end{itemdescr} @@ -11196,7 +11265,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{use_count() == 0}. +\pnum +\returns \tcode{use_count() == 0}. \end{itemdescr} \indexlibrarymember{lock}{weak_ptr}% @@ -11239,7 +11309,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Equivalent to \tcode{a.swap(b)}. +\pnum +\effects Equivalent to \tcode{a.swap(b)}. \end{itemdescr} \rSec2[util.smartptr.ownerless]{Class template \tcode{owner_less}} @@ -11281,7 +11352,8 @@ \end{codeblock} \indexlibrarymember{operator()}{owner_less}% -\pnum \tcode{operator()(x, y)} shall return \tcode{x.owner_before(y)}. \begin{note} +\pnum +\tcode{operator()(x, y)} shall return \tcode{x.owner_before(y)}. \begin{note} Note that \begin{itemize} @@ -11347,7 +11419,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Value-initializes \tcode{weak_this}. +\pnum +\effects Value-initializes \tcode{weak_this}. \end{itemdescr} \indexlibrarymember{operator=}{enable_shared_from_this}% @@ -11356,9 +11429,11 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{*this}. +\pnum +\returns \tcode{*this}. -\pnum\begin{note} \tcode{weak_this} is not changed. \end{note} +\pnum +\begin{note} \tcode{weak_this} is not changed. \end{note} \end{itemdescr} \indexlibrary{\idxcode{shared_ptr}}% @@ -11369,7 +11444,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{shared_ptr(weak_this)}. +\pnum +\returns \tcode{shared_ptr(weak_this)}. \end{itemdescr} \indexlibrary{\idxcode{weak_ptr}}% @@ -11380,7 +11456,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{weak_this}. +\pnum +\returns \tcode{weak_this}. \end{itemdescr} \rSec2[util.smartptr.hash]{Smart pointer hash support} @@ -14045,7 +14122,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Constructs a \tcode{reference_wrapper} object that +\pnum +\effects Constructs a \tcode{reference_wrapper} object that stores a reference to \tcode{x.get()}. \end{itemdescr} @@ -14057,7 +14135,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\ensures \tcode{*this} stores a reference to \tcode{x.get()}. +\pnum +\ensures \tcode{*this} stores a reference to \tcode{x.get()}. \end{itemdescr} \rSec3[refwrap.access]{Access} @@ -14068,7 +14147,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The stored reference. +\pnum +\returns The stored reference. \end{itemdescr} \indexlibrarymember{get}{reference_wrapper}% @@ -14077,7 +14157,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns The stored reference. +\pnum +\returns The stored reference. \end{itemdescr} \rSec3[refwrap.invoke]{Invocation} @@ -14094,7 +14175,8 @@ \mandates \tcode{T} is a complete type. -\pnum\returns \tcode{\placeholdernc{INVOKE}(get(), std::forward(args)...)}.\iref{func.require} +\pnum +\returns \tcode{\placeholdernc{INVOKE}(get(), std::forward(args)...)}.\iref{func.require} \end{itemdescr} @@ -14111,7 +14193,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{reference_wrapper(t)}. +\pnum +\returns \tcode{reference_wrapper(t)}. \end{itemdescr} \indexlibrarymember{ref}{reference_wrapper}% @@ -14120,7 +14203,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{ref(t.get())}. +\pnum +\returns \tcode{ref(t.get())}. \end{itemdescr} \indexlibrarymember{cref}{reference_wrapper}% @@ -14129,7 +14213,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{reference_wrapper (t)}. +\pnum +\returns \tcode{reference_wrapper (t)}. \end{itemdescr} \indexlibrarymember{cref}{reference_wrapper}% @@ -14138,7 +14223,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{cref(t.get())}. +\pnum +\returns \tcode{cref(t.get())}. \end{itemdescr} \rSec3[refwrap.unwrapref]{Transformation type trait \tcode{unwrap_reference}} @@ -14190,7 +14276,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x + y}. +\pnum +\returns \tcode{x + y}. \end{itemdescr} \indexlibrary{\idxcode{plus<>}}% @@ -14210,7 +14297,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) + std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) + std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.minus]{Class template \tcode{minus}} @@ -14228,7 +14316,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x - y}. +\pnum +\returns \tcode{x - y}. \end{itemdescr} \indexlibrary{\idxcode{minus<>}}% @@ -14248,7 +14337,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) - std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) - std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.multiplies]{Class template \tcode{multiplies}} @@ -14266,7 +14356,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x * y}. +\pnum +\returns \tcode{x * y}. \end{itemdescr} \indexlibrary{\idxcode{multiplies<>}}% @@ -14286,7 +14377,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) * std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) * std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.divides]{Class template \tcode{divides}} @@ -14304,7 +14396,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x / y}. +\pnum +\returns \tcode{x / y}. \end{itemdescr} \indexlibrary{\idxcode{divides<>}}% @@ -14324,7 +14417,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) / std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) / std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.modulus]{Class template \tcode{modulus}} @@ -14342,7 +14436,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x \% y}. +\pnum +\returns \tcode{x \% y}. \end{itemdescr} \indexlibrary{\idxcode{modulus<>}}% @@ -14362,7 +14457,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) \% std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) \% std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.negate]{Class template \tcode{negate}} @@ -14380,7 +14476,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{-x}. +\pnum +\returns \tcode{-x}. \end{itemdescr} \indexlibrary{\idxcode{negate<>}}% @@ -14400,7 +14497,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{-std::forward(t)}. +\pnum +\returns \tcode{-std::forward(t)}. \end{itemdescr} @@ -14442,7 +14540,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x == y}. +\pnum +\returns \tcode{x == y}. \end{itemdescr} \indexlibrary{\idxcode{equal_to<>}}% @@ -14462,7 +14561,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) == std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) == std::forward(u)}. \end{itemdescr} \rSec3[comparisons.not.equal.to]{Class template \tcode{not_equal_to}} @@ -14480,7 +14580,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x != y}. +\pnum +\returns \tcode{x != y}. \end{itemdescr} \indexlibrary{\idxcode{not_equal_to<>}}% @@ -14500,7 +14601,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) != std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) != std::forward(u)}. \end{itemdescr} \rSec3[comparisons.greater]{Class template \tcode{greater}} @@ -14518,7 +14620,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x > y}. +\pnum +\returns \tcode{x > y}. \end{itemdescr} \indexlibrary{\idxcode{greater<>}}% @@ -14538,7 +14641,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) > std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) > std::forward(u)}. \end{itemdescr} \rSec3[comparisons.less]{Class template \tcode{less}} @@ -14556,7 +14660,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x < y}. +\pnum +\returns \tcode{x < y}. \end{itemdescr} \indexlibrary{\idxcode{less<>}}% @@ -14576,7 +14681,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) < std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) < std::forward(u)}. \end{itemdescr} \rSec3[comparisons.greater.equal]{Class template \tcode{greater_equal}} @@ -14594,7 +14700,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x >= y}. +\pnum +\returns \tcode{x >= y}. \end{itemdescr} \indexlibrary{\idxcode{greater_equal<>}}% @@ -14614,7 +14721,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) >= std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) >= std::forward(u)}. \end{itemdescr} \rSec3[comparisons.less.equal]{Class template \tcode{less_equal}} @@ -14632,7 +14740,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x <= y}. +\pnum +\returns \tcode{x <= y}. \end{itemdescr} \indexlibrary{\idxcode{less_equal<>}}% @@ -14652,7 +14761,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) <= std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) <= std::forward(u)}. \end{itemdescr} \rSec2[range.cmp]{Concept-constrained comparisons} @@ -14844,7 +14954,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x \&\& y}. +\pnum +\returns \tcode{x \&\& y}. \end{itemdescr} \indexlibrary{\idxcode{logical_and<>}}% @@ -14864,7 +14975,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) \&\& std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) \&\& std::forward(u)}. \end{itemdescr} \rSec3[logical.operations.or]{Class template \tcode{logical_or}} @@ -14882,7 +14994,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x || y}. +\pnum +\returns \tcode{x || y}. \end{itemdescr} \indexlibrary{\idxcode{logical_or<>}}% @@ -14902,7 +15015,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) || std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) || std::forward(u)}. \end{itemdescr} \rSec3[logical.operations.not]{Class template \tcode{logical_not}} @@ -14920,7 +15034,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!x}. +\pnum +\returns \tcode{!x}. \end{itemdescr} \indexlibrary{\idxcode{logical_not<>}}% @@ -14940,7 +15055,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!std::forward(t)}. +\pnum +\returns \tcode{!std::forward(t)}. \end{itemdescr} @@ -14966,7 +15082,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x \& y}. +\pnum +\returns \tcode{x \& y}. \end{itemdescr} \indexlibrary{\idxcode{bit_and<>}}% @@ -14986,7 +15103,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) \& std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) \& std::forward(u)}. \end{itemdescr} \rSec3[bitwise.operations.or]{Class template \tcode{bit_or}} @@ -15004,7 +15122,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x | y}. +\pnum +\returns \tcode{x | y}. \end{itemdescr} \indexlibrary{\idxcode{bit_or<>}}% @@ -15024,7 +15143,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) | std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) | std::forward(u)}. \end{itemdescr} \rSec3[bitwise.operations.xor]{Class template \tcode{bit_xor}} @@ -15042,7 +15162,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{x \caret{} y}. +\pnum +\returns \tcode{x \caret{} y}. \end{itemdescr} \indexlibrary{\idxcode{bit_xor<>}}% @@ -15062,7 +15183,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{std::forward(t) \caret{} std::forward(u)}. +\pnum +\returns \tcode{std::forward(t) \caret{} std::forward(u)}. \end{itemdescr} \rSec3[bitwise.operations.not]{Class template \tcode{bit_not}} @@ -15079,7 +15201,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{\~{}x}. +\pnum +\returns \tcode{\~{}x}. \end{itemdescr} \indexlibrary{\idxcode{bit_not<>}}% @@ -15099,7 +15222,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{\~{}std::forward(t)}. +\pnum +\returns \tcode{\~{}std::forward(t)}. \end{itemdescr} @@ -15324,7 +15448,8 @@ values $\tcode{w}_1$, $\tcode{w}_2$, $\dotsc{}$, $\tcode{w}_N$, where $N$ has the value \tcode{sizeof...(bound_args)}. -\pnum\returns +\pnum +\returns An argument forwarding call wrapper \tcode{g}\iref{func.require}. A program that attempts to invoke a volatile-qualified \tcode{g} is ill-formed. @@ -15574,7 +15699,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\ensures \tcode{!*this}. +\pnum +\ensures \tcode{!*this}. \end{itemdescr} \indexlibrary{\idxcode{function}!constructor}% @@ -15722,11 +15848,14 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects If \tcode{*this != nullptr}, destroys the target of \tcode{this}. +\pnum +\effects If \tcode{*this != nullptr}, destroys the target of \tcode{this}. -\pnum\ensures \tcode{!(*this)}. +\pnum +\ensures \tcode{!(*this)}. -\pnum\returns \tcode{*this}. +\pnum +\returns \tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{function}% @@ -15735,11 +15864,14 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects As if by: \tcode{function(std::forward(f)).swap(*this);} +\pnum +\effects As if by: \tcode{function(std::forward(f)).swap(*this);} -\pnum\returns \tcode{*this}. +\pnum +\returns \tcode{*this}. -\pnum\remarks This assignment operator shall not participate in overload +\pnum +\remarks This assignment operator shall not participate in overload resolution unless \tcode{decay_t} is Lvalue-Callable\iref{func.wrap.func} for argument types \tcode{ArgTypes...} and return type \tcode{R}. @@ -15751,7 +15883,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects As if by: \tcode{function(f).swap(*this);} +\pnum +\effects As if by: \tcode{function(f).swap(*this);} \pnum \returns \tcode{*this}. @@ -15763,7 +15896,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects If \tcode{*this != nullptr}, destroys the target of \tcode{this}. +\pnum +\effects If \tcode{*this != nullptr}, destroys the target of \tcode{this}. \end{itemdescr} \rSec4[func.wrap.func.mod]{Modifiers} @@ -15774,7 +15908,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects Interchanges the targets of \tcode{*this} and \tcode{other}. +\pnum +\effects Interchanges the targets of \tcode{*this} and \tcode{other}. \end{itemdescr} \rSec4[func.wrap.func.cap]{Capacity} @@ -15802,7 +15937,8 @@ \returns \tcode{\placeholdernc{INVOKE}(f, std::forward(args)...)}\iref{func.require}, where \tcode{f} is the target object\iref{func.def} of \tcode{*this}. -\pnum\throws +\pnum +\throws \tcode{bad_function_call} if \tcode{!*this}; otherwise, any exception thrown by the wrapped callable object. \end{itemdescr} @@ -15815,7 +15951,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns If \tcode{*this} has a target of type \tcode{T}, +\pnum +\returns If \tcode{*this} has a target of type \tcode{T}, \tcode{typeid(T)}; otherwise, \tcode{typeid(void)}. \end{itemdescr} @@ -15826,7 +15963,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns If \tcode{target_type() == typeid(T)} +\pnum +\returns If \tcode{target_type() == typeid(T)} a pointer to the stored function target; otherwise a null pointer. \end{itemdescr} @@ -15839,7 +15977,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!f}. +\pnum +\returns \tcode{!f}. \end{itemdescr} \rSec4[func.wrap.func.alg]{Specialized algorithms} @@ -15851,7 +15990,8 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects As if by: \tcode{f1.swap(f2);} +\pnum +\effects As if by: \tcode{f1.swap(f2);} \end{itemdescr}% \indextext{function object!wrapper|)} From c97ef9173e894920b476a05378eb1e0d650a013e Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Tue, 10 Sep 2019 22:57:53 +0200 Subject: [PATCH 25/99] [std] Move library element introducers to a line of their own. --- source/algorithms.tex | 30 +- source/atomics.tex | 183 ++++-- source/containers.tex | 585 ++++++++++++------ source/diagnostics.tex | 141 +++-- source/future.tex | 90 ++- source/iostreams.tex | 1155 ++++++++++++++++++++++------------ source/iterators.tex | 363 +++++++---- source/lib-intro.tex | 30 +- source/locales.tex | 24 +- source/numerics.tex | 372 +++++++---- source/ranges.tex | 480 +++++++++----- source/regex.tex | 378 +++++++---- source/strings.tex | 291 ++++++--- source/support.tex | 177 ++++-- source/threads.tex | 987 +++++++++++++++++++---------- source/time.tex | 1248 ++++++++++++++++++++++++------------- source/utilities.tex | 1341 ++++++++++++++++++++++++++-------------- 17 files changed, 5250 insertions(+), 2625 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 29a254a55f..650ecab563 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -2962,7 +2962,8 @@ in the range \range{first}{last}, and \tcode{false} otherwise. \pnum -\complexity At most \tcode{last - first} applications of the predicate +\complexity +At most \tcode{last - first} applications of the predicate and any projection. \end{itemdescr} @@ -6662,7 +6663,8 @@ \pnum -\complexity Let $N = \tcode{last - first}$: +\complexity +Let $N = \tcode{last - first}$: \begin{itemize} \item For the overload with no \tcode{ExecutionPolicy}, @@ -8851,7 +8853,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return reduce(first, last, typename iterator_traits::value_type{}); @@ -8868,7 +8871,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return reduce(std::forward(exec), first, last, typename iterator_traits::value_type{}); @@ -8884,7 +8888,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return reduce(first, last, init, plus<>()); \end{codeblock} @@ -8899,7 +8904,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return reduce(std::forward(exec), first, last, init, plus<>()); \end{codeblock} @@ -9199,7 +9205,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return exclusive_scan(first, last, result, init, plus<>()); \end{codeblock} @@ -9215,7 +9222,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return exclusive_scan(std::forward(exec), first, last, result, init, plus<>()); @@ -9293,7 +9301,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return inclusive_scan(first, last, result, plus<>()); \end{codeblock} @@ -9309,7 +9318,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return inclusive_scan(std::forward(exec), first, last, result, plus<>()); \end{codeblock} diff --git a/source/atomics.tex b/source/atomics.tex index b7365dabb9..df94ccb82c 100644 --- a/source/atomics.tex +++ b/source/atomics.tex @@ -574,11 +574,13 @@ \begin{itemdescr} \pnum -\effects The argument does not carry a dependency to the return +\effects +The argument does not carry a dependency to the return value\iref{intro.multithread}. \pnum -\returns \tcode{y}. +\returns +\tcode{y}. \end{itemdescr} @@ -823,10 +825,12 @@ \requires The referenced object shall be aligned to \tcode{required_alignment}. \pnum -\effects Constructs an atomic reference that references the object. +\effects +Constructs an atomic reference that references the object. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrary{\idxcode{atomic_ref}!constructor}% @@ -839,7 +843,8 @@ \begin{itemdescr} \pnum -\effects Constructs an atomic reference +\effects +Constructs an atomic reference that references the object referenced by \tcode{ref}. \end{itemdescr} @@ -853,7 +858,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} store(desired); return desired; @@ -870,7 +876,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return load();} +\effects +Equivalent to: \tcode{return load();} \end{itemdescr} \indexlibrarymember{is_lock_free}{atomic_ref}% @@ -883,7 +890,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if the object's operations are lock-free, +\returns +\tcode{true} if the object's operations are lock-free, \tcode{false} otherwise. \end{itemdescr} @@ -903,7 +911,8 @@ \tcode{memory_order_acq_rel}. \pnum -\effects Atomically replaces the value referenced by \tcode{*ptr} +\effects +Atomically replaces the value referenced by \tcode{*ptr} with the value of \tcode{desired}. Memory is affected according to the value of \tcode{order}. \end{itemdescr} @@ -922,10 +931,12 @@ \tcode{memory_order_release} nor \tcode{memory_order_acq_rel}. \pnum -\effects Memory is affected according to the value of \tcode{order}. +\effects +Memory is affected according to the value of \tcode{order}. \pnum -\returns Atomically returns the value referenced by \tcode{*ptr}. +\returns +Atomically returns the value referenced by \tcode{*ptr}. \end{itemdescr} \indexlibrarymember{exchange}{atomic_ref}% @@ -938,13 +949,15 @@ \begin{itemdescr} \pnum -\effects Atomically replaces the value referenced by \tcode{*ptr} +\effects +Atomically replaces the value referenced by \tcode{*ptr} with \tcode{desired}. Memory is affected according to the value of \tcode{order}. This operation is an atomic read-modify-write operation\iref{intro.multithread}. \pnum -\returns Atomically returns the value referenced by \tcode{*ptr} +\returns +Atomically returns the value referenced by \tcode{*ptr} immediately before the effects. \end{itemdescr} @@ -976,7 +989,8 @@ \tcode{memory_order_release} nor \tcode{memory_order_acq_rel}. \pnum -\effects Retrieves the value in \tcode{expected}. +\effects +Retrieves the value in \tcode{expected}. It then atomically compares the value representation of the value referenced by \tcode{*ptr} for equality with that previously retrieved from \tcode{expected}, @@ -1004,10 +1018,12 @@ Otherwise, these operations are atomic load operations on that memory. \pnum -\returns The result of the comparison. +\returns +The result of the comparison. \pnum -\remarks A weak compare-and-exchange operation may fail spuriously. +\remarks +A weak compare-and-exchange operation may fail spuriously. That is, even when the contents of memory referred to by \tcode{expected} and \tcode{ptr} are equal, it may return \tcode{false} and @@ -1201,19 +1217,22 @@ \begin{itemdescr} \pnum -\effects Atomically replaces the value referenced by \tcode{*ptr} with +\effects +Atomically replaces the value referenced by \tcode{*ptr} with the result of the computation applied to the value referenced by \tcode{*ptr} and the given operand. Memory is affected according to the value of \tcode{order}. These operations are atomic read-modify-write operations\iref{intro.races}. \pnum -\returns Atomically, the value referenced by \tcode{*ptr} +\returns +Atomically, the value referenced by \tcode{*ptr} immediately before the effects. \pnum \indextext{signed integer representation!two's complement}% -\remarks For signed integer types, +\remarks +For signed integer types, the result is as if the object value and parameters were converted to their corresponding unsigned types, the computation performed on those types, and @@ -1234,7 +1253,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return fetch_\placeholdernc{key}(operand) \placeholder{op} operand;} \end{itemdescr} @@ -1317,18 +1337,21 @@ \begin{itemdescr} \pnum -\effects Atomically replaces the value referenced by \tcode{*ptr} with +\effects +Atomically replaces the value referenced by \tcode{*ptr} with the result of the computation applied to the value referenced by \tcode{*ptr} and the given operand. Memory is affected according to the value of \tcode{order}. These operations are atomic read-modify-write operations\iref{intro.races}. \pnum -\returns Atomically, the value referenced by \tcode{*ptr} +\returns +Atomically, the value referenced by \tcode{*ptr} immediately before the effects. \pnum -\remarks If the result is not a representable value for its type\iref{expr.pre}, +\remarks +If the result is not a representable value for its type\iref{expr.pre}, the result is unspecified, but the operations otherwise have no undefined behavior. Atomic arithmetic operations on \tcode{\placeholder{floating-point}} should conform to @@ -1346,7 +1369,8 @@ \end{itemdecl} \begin{itemdescr} -\effects Equivalent to: +\effects +Equivalent to: \tcode{return fetch_\placeholder{key}(operand) \placeholdernc{op} operand;} \end{itemdescr} @@ -1423,18 +1447,21 @@ otherwise the program is ill-formed. \pnum -\effects Atomically replaces the value referenced by \tcode{*ptr} with +\effects +Atomically replaces the value referenced by \tcode{*ptr} with the result of the computation applied to the value referenced by \tcode{*ptr} and the given operand. Memory is affected according to the value of \tcode{order}. These operations are atomic read-modify-write operations\iref{intro.races}. \pnum -\returns Atomically, the value referenced by \tcode{*ptr} +\returns +Atomically, the value referenced by \tcode{*ptr} immediately before the effects. \pnum -\remarks The result may be an undefined address, +\remarks +The result may be an undefined address, but the operations otherwise have no undefined behavior. \end{itemdescr} @@ -1446,7 +1473,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return fetch_\placeholder{key}(operand) \placeholdernc{op} operand;} \end{itemdescr} @@ -1461,7 +1489,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_add(1);} +\effects +Equivalent to: \tcode{return fetch_add(1);} \end{itemdescr} \indexlibrarymember{operator\dcr}{atomic_ref}% @@ -1472,7 +1501,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_sub(1);} +\effects +Equivalent to: \tcode{return fetch_sub(1);} \end{itemdescr} \indexlibrarymember{operator++}{atomic_ref}% @@ -1483,7 +1513,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_add(1) + 1;} +\effects +Equivalent to: \tcode{return fetch_add(1) + 1;} \end{itemdescr} \indexlibrarymember{operator\dcr}{atomic_ref}% @@ -1494,7 +1525,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_sub(1) - 1;} +\effects +Equivalent to: \tcode{return fetch_sub(1) - 1;} \end{itemdescr} \rSec1[atomics.types.generic]{Class template \tcode{atomic}} @@ -1604,7 +1636,8 @@ \begin{itemdescr} \pnum -\effects Initializes the object with the value \tcode{desired}. +\effects +Initializes the object with the value \tcode{desired}. Initialization is not an atomic operation\iref{intro.multithread}. \begin{note} It is possible to have an access to an atomic object \tcode{A} race with its construction, for example by communicating the address of the @@ -1664,7 +1697,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if the object's operations are lock-free, \tcode{false} otherwise. +\returns +\tcode{true} if the object's operations are lock-free, \tcode{false} otherwise. \begin{note} The return value of the \tcode{is_lock_free} member function is consistent with the value of \tcode{is_always_lock_free} for the same type. @@ -1688,7 +1722,8 @@ \tcode{memory_order::acquire}, nor \tcode{memory_order::acq_rel}. \pnum -\effects Atomically replaces the value pointed to by \tcode{this} +\effects +Atomically replaces the value pointed to by \tcode{this} with the value of \tcode{desired}. Memory is affected according to the value of \tcode{order}. \end{itemdescr} @@ -1704,10 +1739,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{store(desired)}. +\effects +Equivalent to \tcode{store(desired)}. \pnum -\returns \tcode{desired}. +\returns +\tcode{desired}. \end{itemdescr} \indexlibrary{\idxcode{atomic_load}}% @@ -1726,10 +1763,12 @@ \requires The \tcode{order} argument shall not be \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. \pnum -\effects Memory is affected according to the value of \tcode{order}. +\effects +Memory is affected according to the value of \tcode{order}. \pnum -\returns Atomically returns the value pointed to by \tcode{this}. +\returns +Atomically returns the value pointed to by \tcode{this}. \end{itemdescr} \indexlibrarymember{operator \placeholder{type}}{atomic}% @@ -1743,7 +1782,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return load();} +\effects +Equivalent to: \tcode{return load();} \end{itemdescr} @@ -1760,13 +1800,15 @@ \begin{itemdescr} \pnum -\effects Atomically replaces the value pointed to by \tcode{this} +\effects +Atomically replaces the value pointed to by \tcode{this} with \tcode{desired}. Memory is affected according to the value of \tcode{order}. These operations are atomic read-modify-write operations\iref{intro.multithread}. \pnum -\returns Atomically returns the value pointed to by \tcode{this} immediately before the effects. +\returns +Atomically returns the value pointed to by \tcode{this} immediately before the effects. \end{itemdescr} \indexlibrary{\idxcode{atomic_compare_exchange_weak}}% @@ -1830,7 +1872,8 @@ Otherwise, these operations are atomic load operations on that memory. \pnum -\returns The result of the comparison. +\returns +The result of the comparison. \pnum \begin{note} @@ -2180,18 +2223,21 @@ \begin{itemdescr} \pnum -\effects Atomically replaces the value pointed to by +\effects +Atomically replaces the value pointed to by \tcode{this} with the result of the computation applied to the value pointed to by \tcode{this} and the given \tcode{operand}. Memory is affected according to the value of \tcode{order}. These operations are atomic read-modify-write operations\iref{intro.multithread}. \pnum -\returns Atomically, the value pointed to by \tcode{this} immediately before the effects. +\returns +Atomically, the value pointed to by \tcode{this} immediately before the effects. \pnum \indextext{signed integer representation!two's complement}% -\remarks For signed integer types, +\remarks +For signed integer types, the result is as if the object value and parameters were converted to their corresponding unsigned types, the computation performed on those types, and @@ -2216,7 +2262,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_\placeholder{key}(operand) \placeholder{op} operand;} +\effects +Equivalent to: \tcode{return fetch_\placeholder{key}(operand) \placeholder{op} operand;} \end{itemdescr} \rSec2[atomics.types.float]{Specializations for floating-point types} @@ -2490,17 +2537,20 @@ \begin{note} Pointer arithmetic on \tcode{void*} or function pointers is ill-formed. \end{note} \pnum -\effects Atomically replaces the value pointed to by +\effects +Atomically replaces the value pointed to by \tcode{this} with the result of the computation applied to the value pointed to by \tcode{this} and the given \tcode{operand}. Memory is affected according to the value of \tcode{order}. These operations are atomic read-modify-write operations\iref{intro.multithread}. \pnum -\returns Atomically, the value pointed to by \tcode{this} immediately before the effects. +\returns +Atomically, the value pointed to by \tcode{this} immediately before the effects. \pnum -\remarks The result may be an undefined address, +\remarks +The result may be an undefined address, but the operations otherwise have no undefined behavior. \end{itemdescr} @@ -2513,7 +2563,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_\placeholder{key}(operand) \placeholder{op} operand;} +\effects +Equivalent to: \tcode{return fetch_\placeholder{key}(operand) \placeholder{op} operand;} \end{itemdescr} \rSec2[atomics.types.memop]{Member operators common to integers and pointers to objects} @@ -2527,7 +2578,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_add(1);} +\effects +Equivalent to: \tcode{return fetch_add(1);} \end{itemdescr} \indexlibrarymember{operator\dcr}{atomic}% @@ -2539,7 +2591,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_sub(1);} +\effects +Equivalent to: \tcode{return fetch_sub(1);} \end{itemdescr} \indexlibrarymember{operator++}{atomic}% @@ -2551,7 +2604,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_add(1) + 1;} +\effects +Equivalent to: \tcode{return fetch_add(1) + 1;} \end{itemdescr} \indexlibrarymember{operator\dcr}{atomic}% @@ -2563,7 +2617,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return fetch_sub(1) - 1;} +\effects +Equivalent to: \tcode{return fetch_sub(1) - 1;} \end{itemdescr} @@ -2589,7 +2644,8 @@ \begin{itemdescr} \pnum -\effects Non-atomically +\effects +Non-atomically initializes \tcode{*object} with value \tcode{desired}. This function shall only be applied to objects that have been default constructed, and then only once. \begin{note} @@ -2710,11 +2766,13 @@ \begin{itemdescr} \pnum -\effects Atomically sets the value pointed to by \tcode{object} or by \tcode{this} to \tcode{true}. Memory is affected according to the value of +\effects +Atomically sets the value pointed to by \tcode{object} or by \tcode{this} to \tcode{true}. Memory is affected according to the value of \tcode{order}. These operations are atomic read-modify-write operations\iref{intro.multithread}. \pnum -\returns Atomically, the value of the object immediately before the effects. +\returns +Atomically, the value of the object immediately before the effects. \end{itemdescr} \indexlibrary{\idxcode{atomic_flag_clear}}% @@ -2735,7 +2793,8 @@ \tcode{memory_order::acquire}, nor \tcode{memory_order::acq_rel}. \pnum -\effects Atomically sets the value pointed to by \tcode{object} or by \tcode{this} to +\effects +Atomically sets the value pointed to by \tcode{object} or by \tcode{this} to \tcode{false}. Memory is affected according to the value of \tcode{order}. \end{itemdescr} @@ -2860,7 +2919,8 @@ \begin{itemdescr} \pnum -\effects Depending on the value of \tcode{order}, this operation: +\effects +Depending on the value of \tcode{order}, this operation: \begin{itemize} \item has no effects, if \tcode{order == memory_order::relaxed}; @@ -2882,7 +2942,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{atomic_thread_fence(order)}, except that +\effects +Equivalent to \tcode{atomic_thread_fence(order)}, except that the resulting ordering constraints are established only between a thread and a signal handler executed in the same thread. diff --git a/source/containers.tex b/source/containers.tex index 74fdc20fdd..4ffc7718f5 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -639,7 +639,8 @@ \tcode{X(m)} & & -\ensures \tcode{u.empty()} returns \tcode{true}, & +\ensures +\tcode{u.empty()} returns \tcode{true}, & constant \\ \tcode{X u(m);} & & @@ -649,8 +650,10 @@ \tcode{X(t, m)}\br \tcode{X u(t, m);} & & -\expects \tcode{T} is \oldconcept{CopyInsertable} into \tcode{X}.\br -\ensures \tcode{u == t}, \tcode{u.get_allocator() == m} & +\expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{X}.\br +\ensures +\tcode{u == t}, \tcode{u.get_allocator() == m} & linear \\ \rowsep \tcode{X(rv)}\br @@ -1301,7 +1304,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{\placeholder{node-handle}} object initializing +\effects +Constructs a \tcode{\placeholder{node-handle}} object initializing \tcode{ptr_} with \tcode{nh.ptr_}. Move constructs \tcode{alloc_} with \tcode{nh.alloc_}. Assigns \tcode{nullptr} to \tcode{nh.ptr_} and assigns \tcode{nullopt} to \tcode{nh.alloc_}. @@ -1313,7 +1317,8 @@ \begin{itemdescr} \pnum -\expects Either \tcode{!alloc_}, or +\expects +Either \tcode{!alloc_}, or \tcode{ator_traits::propagate_on_container_move_assignment::value} is \tcode{true}, or \tcode{alloc_ == nh.alloc_}. @@ -1338,10 +1343,12 @@ \end{itemize} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \rSec3[container.node.dtor]{Destructor} @@ -1352,7 +1359,8 @@ \begin{itemdescr} \pnum -\effects If \tcode{ptr_ != nullptr}, destroys the \tcode{value_type} subobject +\effects +If \tcode{ptr_ != nullptr}, destroys the \tcode{value_type} subobject in the \tcode{container_node_type} object pointed to by \tcode{ptr_} by calling \tcode{ator_traits::destroy}, then deallocates \tcode{ptr_} by calling \tcode{ator_traits::template rebind_traits::deallocate}. @@ -1366,14 +1374,17 @@ \begin{itemdescr} \pnum -\expects \tcode{empty() == false}. +\expects +\tcode{empty() == false}. \pnum -\returns A reference to the \tcode{value_type} subobject in the +\returns +A reference to the \tcode{value_type} subobject in the \tcode{container_node_type} object pointed to by \tcode{ptr_}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \begin{itemdecl} @@ -1382,18 +1393,22 @@ \begin{itemdescr} \pnum -\expects \tcode{empty() == false}. +\expects +\tcode{empty() == false}. \pnum -\returns A non-const reference to the \tcode{key_type} member of the +\returns +A non-const reference to the \tcode{key_type} member of the \tcode{value_type} subobject in the \tcode{contain\-er_node_type} object pointed to by \tcode{ptr_}. \pnum -\throws Nothing. +\throws +Nothing. \pnum -\remarks Modifying the key through the returned reference is permitted. +\remarks +Modifying the key through the returned reference is permitted. \end{itemdescr} \begin{itemdecl} @@ -1402,15 +1417,18 @@ \begin{itemdescr} \pnum -\expects \tcode{empty() == false}. +\expects +\tcode{empty() == false}. \pnum -\returns A reference to the \tcode{mapped_type} member of the +\returns +A reference to the \tcode{mapped_type} member of the \tcode{value_type} subobject in the \tcode{container_node_type} object pointed to by \tcode{ptr_}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} @@ -1420,13 +1438,16 @@ \begin{itemdescr} \pnum -\expects \tcode{empty() == false}. +\expects +\tcode{empty() == false}. \pnum -\returns \tcode{*alloc_}. +\returns +\tcode{*alloc_}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \begin{itemdecl} @@ -1435,7 +1456,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ptr_ != nullptr}. +\returns +\tcode{ptr_ != nullptr}. \end{itemdescr} \begin{itemdecl} @@ -1444,7 +1466,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ptr_ == nullptr}. +\returns +\tcode{ptr_ == nullptr}. \end{itemdescr} \rSec3[container.node.modifiers]{Modifiers} @@ -1457,12 +1480,14 @@ \begin{itemdescr} \pnum -\expects \tcode{!alloc_}, or \tcode{!nh.alloc_}, or +\expects +\tcode{!alloc_}, or \tcode{!nh.alloc_}, or \tcode{ator_traits::propagate_on_container_swap::value} is \tcode{true}, or \tcode{alloc_ == nh.alloc_}. \pnum -\effects Calls \tcode{swap(ptr_, nh.ptr_)}. If \tcode{!alloc_}, or +\effects +Calls \tcode{swap(ptr_, nh.ptr_)}. If \tcode{!alloc_}, or \tcode{!nh.alloc_}, or \tcode{ator_traits::propagate_on_container_swap::value} is \tcode{true} calls \tcode{swap(alloc_, nh.alloc_)}. \end{itemdescr} @@ -3369,7 +3394,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\mandates \tcode{(is_same_v \&\& ...)} is \tcode{true}. +\mandates +\tcode{(is_same_v \&\& ...)} is \tcode{true}. \end{itemdescr} \rSec3[array.members]{Member functions} @@ -3381,7 +3407,8 @@ \begin{itemdescr} \pnum -\returns \tcode{N}. +\returns +\tcode{N}. \end{itemdescr} \indexlibrarymember{array}{data}% @@ -3404,7 +3431,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{fill_n(begin(), N, u)}. +\effects +As if by \tcode{fill_n(begin(), N, u)}. \end{itemdescr} \indexlibrarymember{array}{swap}% @@ -3414,7 +3442,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{swap_ranges(begin(), end(), y.begin())}. +\effects +Equivalent to \tcode{swap_ranges(begin(), end(), y.begin())}. \pnum \begin{note} @@ -3441,7 +3470,8 @@ As if by \tcode{x.swap(y)}. \pnum -\complexity Linear in \tcode{N}. +\complexity +Linear in \tcode{N}. \end{itemdescr} \rSec3[array.zero]{Zero-sized arrays} @@ -3482,7 +3512,8 @@ \tcode{T} meets the \oldconcept{CopyConstructible} requirements. \pnum -\returns \tcode{\{\{ a[0], $\dotsc$, a[N - 1] \}\}}. +\returns +\tcode{\{\{ a[0], $\dotsc$, a[N - 1] \}\}}. \end{itemdescr} \indexlibrary{\idxcode{to_array}}% @@ -3502,7 +3533,8 @@ \tcode{T} meets the \oldconcept{MoveConstructible} requirements. \pnum -\returns \tcode{\{\{ std::move(a[0]), $\dotsc$, std::move(a[N - 1]) \}\}}. +\returns +\tcode{\{\{ std::move(a[0]), $\dotsc$, std::move(a[N - 1]) \}\}}. \end{itemdescr} \rSec3[array.tuple]{Tuple interface} @@ -3547,7 +3579,8 @@ \tcode{I < N} is \tcode{true}. \pnum -\returns A reference to the $\tcode{I}^\text{th}$ element of \tcode{a}, +\returns +A reference to the $\tcode{I}^\text{th}$ element of \tcode{a}, where indexing is zero-based. \end{itemdescr} @@ -3716,7 +3749,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{deque} with +\effects +Constructs a \tcode{deque} with \tcode{n} default-inserted elements using the specified allocator. \pnum @@ -3724,7 +3758,8 @@ \tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. \pnum -\complexity Linear in \tcode{n}. +\complexity +Linear in \tcode{n}. \end{itemdescr} \indexlibrary{\idxcode{deque}!constructor}% @@ -3765,7 +3800,8 @@ using the specified allocator. \pnum -\complexity Linear in \tcode{distance(first, last)}. +\complexity +Linear in \tcode{distance(first, last)}. \end{itemdescr} \rSec3[deque.capacity]{Capacity} @@ -3781,7 +3817,8 @@ \tcode{T} is \oldconcept{MoveInsertable} and \oldconcept{DefaultInsertable} into \tcode{*this}. \pnum -\effects If \tcode{sz < size()}, erases the last \tcode{size() - sz} elements +\effects +If \tcode{sz < size()}, erases the last \tcode{size() - sz} elements from the sequence. Otherwise, appends \tcode{sz - size()} default-inserted elements to the sequence. \end{itemdescr} @@ -3797,7 +3834,8 @@ \tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. \pnum -\effects If \tcode{sz < size()}, erases the last \tcode{size() - sz} elements +\effects +If \tcode{sz < size()}, erases the last \tcode{size() - sz} elements from the sequence. Otherwise, appends \tcode{sz - size()} copies of \tcode{c} to the sequence. \end{itemdescr} @@ -3813,7 +3851,8 @@ \tcode{T} is \oldconcept{MoveInsertable} into \tcode{*this}. \pnum -\effects \tcode{shrink_to_fit} is a non-binding request to reduce memory use +\effects +\tcode{shrink_to_fit} is a non-binding request to reduce memory use but does not change the size of the sequence. \begin{note} The request is non-binding to allow latitude for implementation-specific optimizations. \end{note} @@ -4117,10 +4156,12 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{forward_list} object using the specified allocator. +\effects +Constructs an empty \tcode{forward_list} object using the specified allocator. \pnum -\complexity Constant. +\complexity +Constant. \end{itemdescr} \indexlibrary{\idxcode{forward_list}!constructor}% @@ -4130,14 +4171,17 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. \pnum -\effects Constructs a \tcode{forward_list} object with \tcode{n} +\effects +Constructs a \tcode{forward_list} object with \tcode{n} default-inserted elements using the specified allocator. \pnum -\complexity Linear in \tcode{n}. +\complexity +Linear in \tcode{n}. \end{itemdescr} \indexlibrary{\idxcode{forward_list}!constructor}% @@ -4147,13 +4191,16 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. \pnum -\effects Constructs a \tcode{forward_list} object with \tcode{n} copies of \tcode{value} using the specified allocator. +\effects +Constructs a \tcode{forward_list} object with \tcode{n} copies of \tcode{value} using the specified allocator. \pnum -\complexity Linear in \tcode{n}. +\complexity +Linear in \tcode{n}. \end{itemdescr} \indexlibrary{\idxcode{forward_list}!constructor}% @@ -4164,10 +4211,12 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{forward_list} object equal to the range \range{first}{last}. +\effects +Constructs a \tcode{forward_list} object equal to the range \range{first}{last}. \pnum -\complexity Linear in \tcode{distance(first, last)}. +\complexity +Linear in \tcode{distance(first, last)}. \end{itemdescr} \rSec3[forwardlist.iter]{Iterators} @@ -4182,15 +4231,18 @@ \begin{itemdescr} \pnum -\returns A non-dereferenceable iterator that, when incremented, is equal to the iterator +\returns +A non-dereferenceable iterator that, when incremented, is equal to the iterator returned by \tcode{begin()}. \pnum -\effects \tcode{cbefore_begin()} is equivalent to +\effects +\tcode{cbefore_begin()} is equivalent to \tcode{const_cast(*this).before_begin()}. \pnum -\remarks \tcode{before_begin() == end()} shall equal \tcode{false}. +\remarks +\tcode{before_begin() == end()} shall equal \tcode{false}. \end{itemdescr} \rSec3[forwardlist.access]{Element access} @@ -4203,7 +4255,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*begin()} +\returns +\tcode{*begin()} \end{itemdescr} \rSec3[forwardlist.modifiers]{Modifiers} @@ -4225,7 +4278,8 @@ \begin{itemdescr} \pnum -\effects Inserts an object of type \tcode{value_type} constructed with +\effects +Inserts an object of type \tcode{value_type} constructed with \tcode{value_type(std::forward(\brk{}args)...)} at the beginning of the list. \end{itemdescr} @@ -4237,7 +4291,8 @@ \begin{itemdescr} \pnum -\effects Inserts a copy of \tcode{x} at the beginning of the list. +\effects +Inserts a copy of \tcode{x} at the beginning of the list. \end{itemdescr} @@ -4248,7 +4303,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{erase_after(before_begin())}. +\effects +As if by \tcode{erase_after(before_begin())}. \end{itemdescr} \indexlibrarymember{insert_after}{forward_list}% @@ -4259,14 +4315,17 @@ \begin{itemdescr} \pnum -\expects \tcode{position} is \tcode{before_begin()} or is a dereferenceable +\expects +\tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. \pnum -\effects Inserts a copy of \tcode{x} after \tcode{position}. +\effects +Inserts a copy of \tcode{x} after \tcode{position}. \pnum -\returns An iterator pointing to the copy of \tcode{x}. +\returns +An iterator pointing to the copy of \tcode{x}. \end{itemdescr} \indexlibrarymember{insert_after}{forward_list}% @@ -4276,11 +4335,13 @@ \begin{itemdescr} \pnum -\expects \tcode{position} is \tcode{before_begin()} or is a dereferenceable +\expects +\tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. \pnum -\effects Inserts \tcode{n} copies of \tcode{x} after \tcode{position}. +\effects +Inserts \tcode{n} copies of \tcode{x} after \tcode{position}. \pnum \returns @@ -4295,12 +4356,14 @@ \begin{itemdescr} \pnum -\expects \tcode{position} is \tcode{before_begin()} or is a dereferenceable +\expects +\tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. Neither \tcode{first} nor \tcode{last} are iterators in \tcode{*this}. \pnum -\effects Inserts copies of elements in \range{first}{last} after \tcode{position}. +\effects +Inserts copies of elements in \range{first}{last} after \tcode{position}. \pnum \returns @@ -4314,7 +4377,8 @@ \begin{itemdescr} \pnum -\effects \tcode{insert_after(p, il.begin(), il.end())}. +\effects +\tcode{insert_after(p, il.begin(), il.end())}. \pnum \returns @@ -4330,15 +4394,18 @@ \begin{itemdescr} \pnum -\expects \tcode{position} is \tcode{before_begin()} or is a dereferenceable +\expects +\tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. \pnum -\effects Inserts an object of type \tcode{value_type} constructed with +\effects +Inserts an object of type \tcode{value_type} constructed with \tcode{value_type(std::forward(\brk{}args)...)} after \tcode{position}. \pnum -\returns An iterator pointing to the new object. +\returns +An iterator pointing to the new object. \end{itemdescr} \indexlibrarymember{erase_after}{forward_list}% @@ -4348,17 +4415,21 @@ \begin{itemdescr} \pnum -\expects The iterator following \tcode{position} is dereferenceable. +\expects +The iterator following \tcode{position} is dereferenceable. \pnum -\effects Erases the element pointed to by the iterator following \tcode{position}. +\effects +Erases the element pointed to by the iterator following \tcode{position}. \pnum -\returns An iterator pointing to the element following the one that was +\returns +An iterator pointing to the element following the one that was erased, or \tcode{end()} if no such element exists. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \begin{itemdecl} @@ -4367,16 +4438,20 @@ \begin{itemdescr} \pnum -\expects All iterators in the range \orange{position}{last} are dereferenceable. +\expects +All iterators in the range \orange{position}{last} are dereferenceable. \pnum -\effects Erases the elements in the range \orange{position}{last}. +\effects +Erases the elements in the range \orange{position}{last}. \pnum -\returns \tcode{last}. +\returns +\tcode{last}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{resize}{forward_list}% @@ -4386,10 +4461,12 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. \pnum -\effects If \tcode{sz < distance(begin(), end())}, erases the last \tcode{distance(begin(), +\effects +If \tcode{sz < distance(begin(), end())}, erases the last \tcode{distance(begin(), end()) - sz} elements from the list. Otherwise, inserts \tcode{sz - distance(begin(), end())} default-inserted elements at the end of the list. \end{itemdescr} @@ -4400,10 +4477,12 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. \pnum -\effects If \tcode{sz < distance(begin(), end())}, erases the last \tcode{distance(begin(), +\effects +If \tcode{sz < distance(begin(), end())}, erases the last \tcode{distance(begin(), end()) - sz} elements from the list. Otherwise, inserts \tcode{sz - distance(begin(), end())} copies of \tcode{c} at the end of the list. \end{itemdescr} @@ -4416,10 +4495,12 @@ \begin{itemdescr} \pnum -\effects Erases all elements in the range \range{begin()}{end()}. +\effects +Erases all elements in the range \range{begin()}{end()}. \pnum -\remarks Does not invalidate past-the-end iterators. +\remarks +Does not invalidate past-the-end iterators. \end{itemdescr} \rSec3[forwardlist.ops]{Operations} @@ -4440,23 +4521,27 @@ \begin{itemdescr} \pnum -\expects \tcode{position} is \tcode{before_begin()} or is a dereferenceable +\expects +\tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. \tcode{get_allocator() == x.get_allocator()} is \tcode{true}. \tcode{addressof(x) != this} is \tcode{true}. \pnum -\effects Inserts the contents of \tcode{x} after +\effects +Inserts the contents of \tcode{x} after \tcode{position}, and \tcode{x} becomes empty. Pointers and references to the moved elements of \tcode{x} now refer to those same elements but as members of \tcode{*this}. Iterators referring to the moved elements will continue to refer to their elements, but they now behave as iterators into \tcode{*this}, not into \tcode{x}. \pnum -\throws Nothing. +\throws +Nothing. \pnum -\complexity \bigoh{\tcode{distance(x.begin(), x.end())}} +\complexity +\bigoh{\tcode{distance(x.begin(), x.end())}} \end{itemdescr} \indexlibrarymember{splice_after}{forward_list}% @@ -4467,13 +4552,15 @@ \begin{itemdescr} \pnum -\expects \tcode{position} is \tcode{before_begin()} or is a dereferenceable +\expects +\tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. The iterator following \tcode{i} is a dereferenceable iterator in \tcode{x}. \tcode{get_allocator() == x.get_allocator()} is \tcode{true}. \pnum -\effects Inserts the element following \tcode{i} into \tcode{*this}, following +\effects +Inserts the element following \tcode{i} into \tcode{*this}, following \tcode{position}, and removes it from \tcode{x}. The result is unchanged if \tcode{position == i} or \tcode{position == ++i}. Pointers and references to \tcode{*++i} continue to refer to the same element but as a member of @@ -4481,10 +4568,12 @@ the same element, but now behave as iterators into \tcode{*this}, not into \tcode{x}. \pnum -\throws Nothing. +\throws +Nothing. \pnum -\complexity \bigoh{1} +\complexity +\bigoh{1} \end{itemdescr} \indexlibrarymember{splice_after}{forward_list}% @@ -4497,21 +4586,24 @@ \begin{itemdescr} \pnum -\expects \tcode{position} is \tcode{before_begin()} or is a +\expects +\tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. \orange{first}{last} is a valid range in \tcode{x}, and all iterators in the range \orange{first}{last} are dereferenceable. \tcode{position} is not an iterator in the range \orange{first}{last}. \tcode{get_allocator() == x.get_allocator()} is \tcode{true}. \pnum -\effects Inserts elements in the range \orange{first}{last} after \tcode{position} and +\effects +Inserts elements in the range \orange{first}{last} after \tcode{position} and removes the elements from \tcode{x}. Pointers and references to the moved elements of \tcode{x} now refer to those same elements but as members of \tcode{*this}. Iterators referring to the moved elements will continue to refer to their elements, but they now behave as iterators into \tcode{*this}, not into \tcode{x}. \pnum -\complexity \bigoh{\tcode{distance(first, last)}} +\complexity +\bigoh{\tcode{distance(first, last)}} \end{itemdescr} \indexlibrarymember{remove}{forward_list}% @@ -4523,23 +4615,28 @@ \begin{itemdescr} \pnum -\effects Erases all the elements in the list referred to by a list iterator \tcode{i} for +\effects +Erases all the elements in the list referred to by a list iterator \tcode{i} for which the following conditions hold: \tcode{*i == value} (for \tcode{remove()}), \tcode{pred(*i)} is \tcode{true} (for \tcode{remove_if()}). Invalidates only the iterators and references to the erased elements. \pnum -\returns The number of elements erased. +\returns +The number of elements erased. \pnum -\throws Nothing unless an exception is thrown by the equality comparison or the +\throws +Nothing unless an exception is thrown by the equality comparison or the predicate. \pnum -\remarks Stable\iref{algorithm.stable}. +\remarks +Stable\iref{algorithm.stable}. \pnum -\complexity Exactly \tcode{distance(begin(), end())} applications of the corresponding +\complexity +Exactly \tcode{distance(begin(), end())} applications of the corresponding predicate. \end{itemdescr} @@ -4551,20 +4648,24 @@ \begin{itemdescr} \pnum -\effects Erases all but the first element from every consecutive +\effects +Erases all but the first element from every consecutive group of equal elements referred to by the iterator \tcode{i} in the range \range{first + 1}{last} for which \tcode{*i == *(i-1)} (for the version with no arguments) or \tcode{pred(*i, *(i - 1))} (for the version with a predicate argument) holds. Invalidates only the iterators and references to the erased elements. \pnum -\returns The number of elements erased. +\returns +The number of elements erased. \pnum -\throws Nothing unless an exception is thrown by the equality comparison or the predicate. +\throws +Nothing unless an exception is thrown by the equality comparison or the predicate. \pnum -\complexity If the range \range{first}{last} is not empty, exactly \tcode{(last - first) - 1} applications of the corresponding predicate, otherwise no applications of the predicate. +\complexity +If the range \range{first}{last} is not empty, exactly \tcode{(last - first) - 1} applications of the corresponding predicate, otherwise no applications of the predicate. \end{itemdescr} \indexlibrarymember{merge}{forward_list}% @@ -4577,13 +4678,15 @@ \begin{itemdescr} \pnum -\expects \tcode{*this} and \tcode{x} are both sorted with respect to +\expects +\tcode{*this} and \tcode{x} are both sorted with respect to the comparator \tcode{operator<} (for the first two overloads) or \tcode{comp} (for the last two overloads), and \tcode{get_allocator() == x.get_allocator()} is \tcode{true}. \pnum -\effects Merges the two sorted ranges \tcode{[begin(), end())} and +\effects +Merges the two sorted ranges \tcode{[begin(), end())} and \tcode{[x.begin(), x.end())}. \tcode{x} is empty after the merge. If an exception is thrown other than by a comparison there are no effects. Pointers and references to the moved elements of \tcode{x} now refer to those same elements @@ -4592,10 +4695,12 @@ \tcode{x}. \pnum -\remarks Stable\iref{algorithm.stable}. +\remarks +Stable\iref{algorithm.stable}. \pnum -\complexity At most \tcode{distance(begin(), +\complexity +At most \tcode{distance(begin(), end()) + distance(x.begin(), x.end()) - 1} comparisons. \end{itemdescr} @@ -4607,15 +4712,18 @@ \begin{itemdescr} \pnum -\effects Sorts the list according to the \tcode{operator<} or the \tcode{comp} function object. +\effects +Sorts the list according to the \tcode{operator<} or the \tcode{comp} function object. If an exception is thrown, the order of the elements in \tcode{*this} is unspecified. Does not affect the validity of iterators and references. \pnum -\remarks Stable\iref{algorithm.stable}. +\remarks +Stable\iref{algorithm.stable}. \pnum -\complexity Approximately $N \log N$ comparisons, where $N$ is \tcode{distance(begin(), end())}. +\complexity +Approximately $N \log N$ comparisons, where $N$ is \tcode{distance(begin(), end())}. \end{itemdescr} \indexlibrarymember{reverse}{forward_list}% @@ -4625,11 +4733,13 @@ \begin{itemdescr} \pnum -\effects Reverses the order of the elements in the list. +\effects +Reverses the order of the elements in the list. Does not affect the validity of iterators and references. \pnum -\complexity Linear time. +\complexity +Linear time. \end{itemdescr} \rSec3[forward.list.erasure]{Erasure} @@ -4854,10 +4964,12 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. \pnum -\effects Constructs a \tcode{list} with +\effects +Constructs a \tcode{list} with \tcode{n} default-inserted elements using the specified allocator. \pnum @@ -4873,7 +4985,8 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. \pnum \effects @@ -4920,7 +5033,8 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. \pnum \effects @@ -4943,7 +5057,8 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. \pnum \effects @@ -5014,7 +5129,8 @@ Invalidates only the iterators and references to the erased elements. \pnum -\throws Nothing. +\throws +Nothing. \pnum \complexity @@ -5076,7 +5192,8 @@ \tcode{x}. \pnum -\throws Nothing. +\throws +Nothing. \pnum \complexity @@ -5121,7 +5238,8 @@ \tcode{x}. \pnum -\throws Nothing. +\throws +Nothing. \pnum \complexity @@ -5161,7 +5279,8 @@ \tcode{x}. \pnum -\throws Nothing. +\throws +Nothing. \pnum \complexity @@ -5184,7 +5303,8 @@ Invalidates only the iterators and references to the erased elements. \pnum -\returns The number of elements erased. +\returns +The number of elements erased. \pnum \throws @@ -5194,7 +5314,8 @@ \tcode{pred(*i) != false}. \pnum -\remarks Stable\iref{algorithm.stable}. +\remarks +Stable\iref{algorithm.stable}. \pnum \complexity @@ -5220,7 +5341,8 @@ Invalidates only the iterators and references to the erased elements. \pnum -\returns The number of elements erased. +\returns +The number of elements erased. \pnum \throws @@ -5269,7 +5391,8 @@ \tcode{x}. \pnum -\remarks Stable\iref{algorithm.stable}. If \tcode{addressof(x) != this}, the range \tcode{[x.begin(), x.end())} +\remarks +Stable\iref{algorithm.stable}. If \tcode{addressof(x) != this}, the range \tcode{[x.begin(), x.end())} is empty after the merge. No elements are copied by this operation. @@ -5314,7 +5437,8 @@ Does not affect the validity of iterators and references. \pnum -\remarks Stable\iref{algorithm.stable}. +\remarks +Stable\iref{algorithm.stable}. \pnum \complexity @@ -5515,11 +5639,13 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{vector}, using the +\effects +Constructs an empty \tcode{vector}, using the specified allocator. \pnum -\complexity Constant. +\complexity +Constant. \end{itemdescr} \indexlibrary{\idxcode{vector}!constructor} @@ -5529,14 +5655,17 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{DefaultInsertable} into \tcode{*this}. \pnum -\effects Constructs a \tcode{vector} with \tcode{n} +\effects +Constructs a \tcode{vector} with \tcode{n} default-inserted elements using the specified allocator. \pnum -\complexity Linear in \tcode{n}. +\complexity +Linear in \tcode{n}. \end{itemdescr} \indexlibrary{\idxcode{vector}!constructor} @@ -5547,15 +5676,18 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is +\expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. \pnum -\effects Constructs a \tcode{vector} with \tcode{n} +\effects +Constructs a \tcode{vector} with \tcode{n} copies of \tcode{value}, using the specified allocator. \pnum -\complexity Linear in \tcode{n}. +\complexity +Linear in \tcode{n}. \end{itemdescr} \indexlibrary{\idxcode{vector}!constructor} @@ -5568,7 +5700,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{vector} equal to the +\effects +Constructs a \tcode{vector} equal to the range \range{first}{last}, using the specified allocator. \pnum @@ -5605,7 +5738,8 @@ without requiring reallocation. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \indexlibrary{\idxcode{reserve}!\idxcode{vector}}% @@ -5615,7 +5749,8 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{MoveInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{MoveInsertable} into \tcode{*this}. \pnum \effects @@ -5667,10 +5802,12 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is \oldconcept{MoveInsertable} into \tcode{*this}. +\expects +\tcode{T} is \oldconcept{MoveInsertable} into \tcode{*this}. \pnum -\effects \tcode{shrink_to_fit} is a non-binding request to reduce +\effects +\tcode{shrink_to_fit} is a non-binding request to reduce \tcode{capacity()} to \tcode{size()}. \begin{note} The request is non-binding to allow latitude for implementation-specific optimizations. \end{note} @@ -5685,7 +5822,8 @@ linear in the size of the sequence. \pnum -\remarks Reallocation invalidates all the references, pointers, and iterators +\remarks +Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence as well as the past-the-end iterator. \begin{note} If no reallocation happens, they remain valid. @@ -5720,16 +5858,19 @@ \begin{itemdescr} \pnum -\expects \tcode{T} is +\expects +\tcode{T} is \oldconcept{MoveInsertable} and \oldconcept{DefaultInsertable} into \tcode{*this}. \pnum -\effects If \tcode{sz < size()}, erases the last \tcode{size() - sz} elements +\effects +If \tcode{sz < size()}, erases the last \tcode{size() - sz} elements from the sequence. Otherwise, appends \tcode{sz - size()} default-inserted elements to the sequence. \pnum -\remarks If an exception is thrown other than by the move constructor of a non-\oldconcept{CopyInsertable} +\remarks +If an exception is thrown other than by the move constructor of a non-\oldconcept{CopyInsertable} \tcode{T} there are no effects. \end{itemdescr} @@ -5741,15 +5882,18 @@ \begin{itemdescr} \pnum \pnum -\expects \tcode{T} is +\expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{*this}. -\effects If \tcode{sz < size()}, erases the last \tcode{size() - sz} elements +\effects +If \tcode{sz < size()}, erases the last \tcode{size() - sz} elements from the sequence. Otherwise, appends \tcode{sz - size()} copies of \tcode{c} to the sequence. \pnum -\remarks If an exception is thrown there are no effects. +\remarks +If an exception is thrown there are no effects. \end{itemdescr} \rSec3[vector.data]{Data} @@ -6017,7 +6161,8 @@ \begin{itemdescr} \pnum -\effects Replaces each element in the container with its complement. +\effects +Replaces each element in the container with its complement. \end{itemdescr} \indexlibrarymember{swap}{vector}% @@ -6027,7 +6172,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the contents of \tcode{x} and \tcode{y} as if by: +\effects +Exchanges the contents of \tcode{x} and \tcode{y} as if by: \begin{codeblock} bool b = x; @@ -6527,7 +6673,8 @@ no such element is present. \pnum -\complexity Logarithmic. +\complexity +Logarithmic. \end{itemdescr} \rSec3[map.modifiers]{Modifiers} @@ -8047,7 +8194,8 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{unordered_map} using the +\effects +Constructs an empty \tcode{unordered_map} using the specified hash function, key equality predicate, and allocator, and using at least \tcode{n} buckets. For the default constructor, the number of buckets is \impldef{default number of buckets in @@ -8055,7 +8203,8 @@ \tcode{max_load_factor()} returns \tcode{1.0}. \pnum -\complexity Constant. +\complexity +Constant. \end{itemdescr} \indexlibrary{\idxcode{unordered_map}!constructor}% @@ -8075,7 +8224,8 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{unordered_map} using the +\effects +Constructs an empty \tcode{unordered_map} using the specified hash function, key equality predicate, and allocator, and using at least \tcode{n} buckets. If \tcode{n} is not provided, the number of buckets is \impldef{default number of buckets in @@ -8086,7 +8236,8 @@ \tcode{max_load_factor()} returns \tcode{1.0}. \pnum -\complexity Average case linear, worst case quadratic. +\complexity +Average case linear, worst case quadratic. \end{itemdescr} \rSec3[unord.map.elem]{Element access} @@ -8099,7 +8250,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return try_emplace(k).first->second;} +\effects +Equivalent to: \tcode{return try_emplace(k).first->second;} \end{itemdescr} \indexlibrarymember{unordered_map}{operator[]}% @@ -8110,7 +8262,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return try_emplace(move(k)).first->second;} +\effects +Equivalent to: \tcode{return try_emplace(move(k)).first->second;} \end{itemdescr} \indexlibrarymember{unordered_map}{at}% @@ -8122,10 +8275,12 @@ \begin{itemdescr} \pnum -\returns A reference to \tcode{x.second}, where \tcode{x} is the (unique) element whose key is equivalent to \tcode{k}. +\returns +A reference to \tcode{x.second}, where \tcode{x} is the (unique) element whose key is equivalent to \tcode{k}. \pnum -\throws An exception object of type \tcode{out_of_range} if no such element is present. +\throws +An exception object of type \tcode{out_of_range} if no such element is present. \end{itemdescr} \rSec3[unord.map.modifiers]{Modifiers} @@ -8143,7 +8298,8 @@ \tcode{is_constructible_v} is \tcode{true}. \pnum -\effects Equivalent to: \tcode{return emplace(std::forward

(obj));} +\effects +Equivalent to: \tcode{return emplace(std::forward

(obj));} \end{itemdescr} \indexlibrarymember{unordered_map}{insert}% @@ -8158,7 +8314,8 @@ \tcode{is_constructible_v} is \tcode{true}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return emplace_hint(hint, std::forward

(obj));} \end{itemdescr} @@ -8613,7 +8770,8 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{unordered_multimap} using the +\effects +Constructs an empty \tcode{unordered_multimap} using the specified hash function, key equality predicate, and allocator, and using at least \tcode{n} buckets. For the default constructor, the number of buckets is \impldef{default number of buckets in @@ -8621,7 +8779,8 @@ \tcode{max_load_factor()} returns \tcode{1.0}. \pnum -\complexity Constant. +\complexity +Constant. \end{itemdescr} \indexlibrary{\idxcode{unordered_multimap}!constructor}% @@ -8641,7 +8800,8 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{unordered_multimap} using the +\effects +Constructs an empty \tcode{unordered_multimap} using the specified hash function, key equality predicate, and allocator, and using at least \tcode{n} buckets. If \tcode{n} is not provided, the number of buckets is \impldef{default number of buckets in @@ -8652,7 +8812,8 @@ \tcode{max_load_factor()} returns \tcode{1.0}. \pnum -\complexity Average case linear, worst case quadratic. +\complexity +Average case linear, worst case quadratic. \end{itemdescr} \rSec3[unord.multimap.modifiers]{Modifiers} @@ -8669,7 +8830,8 @@ \tcode{is_constructible_v} is \tcode{true}. \pnum -\effects Equivalent to: \tcode{return emplace(std::forward

(obj));} +\effects +Equivalent to: \tcode{return emplace(std::forward

(obj));} \end{itemdescr} \indexlibrarymember{unordered_multimap}{insert}% @@ -8684,7 +8846,8 @@ \tcode{is_constructible_v} is \tcode{true}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return emplace_hint(hint, std::forward

(obj));} \end{itemdescr} @@ -8964,7 +9127,8 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{unordered_set} using the +\effects +Constructs an empty \tcode{unordered_set} using the specified hash function, key equality predicate, and allocator, and using at least \tcode{n} buckets. For the default constructor, the number of buckets is \impldef{default number of buckets in @@ -8972,7 +9136,8 @@ \tcode{max_load_factor()} returns \tcode{1.0}. \pnum -\complexity Constant. +\complexity +Constant. \end{itemdescr} \indexlibrary{\idxcode{unordered_set}!constructor}% @@ -8992,7 +9157,8 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{unordered_set} using the +\effects +Constructs an empty \tcode{unordered_set} using the specified hash function, key equality predicate, and allocator, and using at least \tcode{n} buckets. If \tcode{n} is not provided, the number of buckets is \impldef{default number of buckets in @@ -9003,7 +9169,8 @@ \tcode{max_load_factor()} returns \tcode{1.0}. \pnum -\complexity Average case linear, worst case quadratic. +\complexity +Average case linear, worst case quadratic. \end{itemdescr} \rSec3[unord.set.erasure]{Erasure} @@ -9288,7 +9455,8 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{unordered_multiset} using the +\effects +Constructs an empty \tcode{unordered_multiset} using the specified hash function, key equality predicate, and allocator, and using at least \tcode{n} buckets. For the default constructor, the number of buckets is \impldef{default number of buckets in @@ -9296,7 +9464,8 @@ \tcode{max_load_factor()} returns \tcode{1.0}. \pnum -\complexity Constant. +\complexity +Constant. \end{itemdescr} \indexlibrary{\idxcode{unordered_multiset}!constructor}% @@ -9328,7 +9497,8 @@ \tcode{max_load_factor()} returns \tcode{1.0}. \pnum -\complexity Average case linear, worst case quadratic. +\complexity +Average case linear, worst case quadratic. \end{itemdescr} \rSec3[unord.multiset.erasure]{Erasure} @@ -9543,7 +9713,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{cont}. +\effects +Initializes \tcode{c} with \tcode{cont}. \end{itemdescr} \begin{itemdecl} @@ -9552,7 +9723,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{std::move(cont)}. +\effects +Initializes \tcode{c} with \tcode{std::move(cont)}. \end{itemdescr} \rSec3[queue.cons.alloc]{Constructors with allocators} @@ -9567,7 +9739,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{a}. +\effects +Initializes \tcode{c} with \tcode{a}. \end{itemdescr} \begin{itemdecl} @@ -9576,7 +9749,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{cont} as the first argument and \tcode{a} +\effects +Initializes \tcode{c} with \tcode{cont} as the first argument and \tcode{a} as the second argument. \end{itemdescr} @@ -9586,7 +9760,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{std::move(cont)} as the first argument and \tcode{a} +\effects +Initializes \tcode{c} with \tcode{std::move(cont)} as the first argument and \tcode{a} as the second argument. \end{itemdescr} @@ -9596,7 +9771,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{q.c} as the first argument and \tcode{a} as the +\effects +Initializes \tcode{c} with \tcode{q.c} as the first argument and \tcode{a} as the second argument. \end{itemdescr} @@ -9606,7 +9782,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{std::move(q.c)} as the first argument and \tcode{a} +\effects +Initializes \tcode{c} with \tcode{std::move(q.c)} as the first argument and \tcode{a} as the second argument. \end{itemdescr} @@ -9712,7 +9889,8 @@ \tcode{is_swappable_v} is \tcode{true}. \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec2[priority.queue]{Class template \tcode{priority_queue}} @@ -9876,7 +10054,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{a} and value-initializes \tcode{comp}. +\effects +Initializes \tcode{c} with \tcode{a} and value-initializes \tcode{comp}. \end{itemdescr} \indexlibrary{\idxcode{priority_queue}!constructor}% @@ -9886,7 +10065,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{a} and initializes \tcode{comp} with \tcode{compare}. +\effects +Initializes \tcode{c} with \tcode{a} and initializes \tcode{comp} with \tcode{compare}. \end{itemdescr} \indexlibrary{\idxcode{priority_queue}!constructor}% @@ -9897,7 +10077,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{cont} as the first argument and \tcode{a} as the second +\effects +Initializes \tcode{c} with \tcode{cont} as the first argument and \tcode{a} as the second argument, and initializes \tcode{comp} with \tcode{compare}; calls \tcode{make_heap(c.begin(), c.end(), comp)}. \end{itemdescr} @@ -9910,7 +10091,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{std::move(cont)} as the first argument and \tcode{a} +\effects +Initializes \tcode{c} with \tcode{std::move(cont)} as the first argument and \tcode{a} as the second argument, and initializes \tcode{comp} with \tcode{compare}; calls \tcode{make_heap(c.begin(), c.end(), comp)}. \end{itemdescr} @@ -9922,7 +10104,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{q.c} as the first argument and \tcode{a} as +\effects +Initializes \tcode{c} with \tcode{q.c} as the first argument and \tcode{a} as the second argument, and initializes \tcode{comp} with \tcode{q.comp}. \end{itemdescr} @@ -9933,7 +10116,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{std::move(q.c)} as the first argument and \tcode{a} +\effects +Initializes \tcode{c} with \tcode{std::move(q.c)} as the first argument and \tcode{a} as the second argument, and initializes \tcode{comp} with \tcode{std::move(q.comp)}. \end{itemdescr} @@ -10016,7 +10200,8 @@ \tcode{is_swappable_v} is \tcode{true}. \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec2[stack]{Class template \tcode{stack}} @@ -10098,7 +10283,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{c} with \tcode{cont}. +\effects +Initializes \tcode{c} with \tcode{cont}. \end{itemdescr} \indexlibrary{\idxcode{stack}!constructor}% @@ -10108,7 +10294,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{c} with \tcode{std::move(cont)}. +\effects +Initializes \tcode{c} with \tcode{std::move(cont)}. \end{itemdescr} \rSec3[stack.cons.alloc]{Constructors with allocators} @@ -10124,7 +10311,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{a}. +\effects +Initializes \tcode{c} with \tcode{a}. \end{itemdescr} \indexlibrary{\idxcode{stack}!constructor}% @@ -10134,7 +10322,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{cont} as the first argument and \tcode{a} as the +\effects +Initializes \tcode{c} with \tcode{cont} as the first argument and \tcode{a} as the second argument. \end{itemdescr} @@ -10145,7 +10334,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{std::move(cont)} as the first argument and \tcode{a} +\effects +Initializes \tcode{c} with \tcode{std::move(cont)} as the first argument and \tcode{a} as the second argument. \end{itemdescr} @@ -10156,7 +10346,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{s.c} as the first argument and \tcode{a} +\effects +Initializes \tcode{c} with \tcode{s.c} as the first argument and \tcode{a} as the second argument. \end{itemdescr} @@ -10167,7 +10358,8 @@ \begin{itemdescr} \pnum -\effects\ Initializes \tcode{c} with \tcode{std::move(s.c)} as the first argument and \tcode{a} +\effects +Initializes \tcode{c} with \tcode{std::move(s.c)} as the first argument and \tcode{a} as the second argument. \end{itemdescr} @@ -10272,7 +10464,8 @@ \tcode{is_swappable_v} is \tcode{true}. \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec1[views]{Views} @@ -10455,7 +10648,8 @@ \begin{itemdescr} \pnum -\expects \range{ptr}{ptr + count} is a valid range. +\expects +\range{ptr}{ptr + count} is a valid range. If \tcode{extent} is not equal to \tcode{dynamic_extent}, then \tcode{count} is equal to \tcode{extent}. @@ -10993,5 +11187,6 @@ \tcode{Extent != dynamic_extent \&\& I < Extent} is \tcode{true}. \pnum -\returns \tcode{s[I]}. +\returns +\tcode{s[I]}. \end{itemdescr} diff --git a/source/diagnostics.tex b/source/diagnostics.tex index bd751d600c..621728eebe 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -881,7 +881,8 @@ \begin{itemdescr} \pnum -\returns A string naming the error category. +\returns +A string naming the error category. \end{itemdescr} \indexlibrarymember{default_error_condition}{error_category}% @@ -902,7 +903,8 @@ \begin{itemdescr} \pnum -\returns \tcode{default_error_condition(code) == condition}. +\returns +\tcode{default_error_condition(code) == condition}. \end{itemdescr} \indexlibrarymember{equivalent}{error_category}% @@ -912,7 +914,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*this == code.category() \&\& code.value() == condition}. +\returns +\tcode{*this == code.category() \&\& code.value() == condition}. \end{itemdescr} \indexlibrarymember{message}{error_category}% @@ -922,7 +925,8 @@ \begin{itemdescr} \pnum -\returns A string that describes the error condition denoted by \tcode{ev}. +\returns +A string that describes the error condition denoted by \tcode{ev}. \end{itemdescr} \rSec3[syserr.errcat.nonvirtuals]{Non-virtual members} @@ -934,7 +938,8 @@ \begin{itemdescr} \pnum -\returns \tcode{this == \&rhs}. +\returns +\tcode{this == \&rhs}. \end{itemdescr} \indexlibrarymember{operator<=>}{error_category}% @@ -944,7 +949,8 @@ \begin{itemdescr} \pnum -\returns \tcode{compare_three_way()(this, \&rhs)}. +\returns +\tcode{compare_three_way()(this, \&rhs)}. \begin{note} \tcode{compare_three_way}\iref{cmp.object} provides a total ordering for pointers. @@ -960,7 +966,8 @@ \begin{itemdescr} \pnum -\returns A string naming the error category. +\returns +A string naming the error category. \end{itemdescr} \indexlibrarymember{default_error_condition}{error_category}% @@ -970,7 +977,8 @@ \begin{itemdescr} \pnum -\returns An object of type \tcode{error_condition} that corresponds to \tcode{ev}. +\returns +An object of type \tcode{error_condition} that corresponds to \tcode{ev}. \end{itemdescr} \indexlibrarymember{equivalent}{error_category}% @@ -980,7 +988,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if, for the category of error represented by \tcode{*this}, \tcode{code} is considered equivalent to \tcode{condition}; otherwise, \tcode{false}. +\returns +\tcode{true} if, for the category of error represented by \tcode{*this}, \tcode{code} is considered equivalent to \tcode{condition}; otherwise, \tcode{false}. \end{itemdescr} \indexlibrarymember{equivalent}{error_category}% @@ -990,7 +999,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if, for the category of error represented by \tcode{*this}, \tcode{code} is considered equivalent to \tcode{condition}; otherwise, \tcode{false}. +\returns +\tcode{true} if, for the category of error represented by \tcode{*this}, \tcode{code} is considered equivalent to \tcode{condition}; otherwise, \tcode{false}. \end{itemdescr} \rSec3[syserr.errcat.objects]{Error category objects} @@ -1002,11 +1012,13 @@ \begin{itemdescr} \pnum -\returns A reference to an object of a type derived from class \tcode{error_category}. +\returns +A reference to an object of a type derived from class \tcode{error_category}. All calls to this function shall return references to the same object. \pnum -\remarks The object's \tcode{default_error_condition} and \tcode{equivalent} virtual functions shall behave as specified for the class \tcode{error_category}. The object's \tcode{name} virtual function shall return a pointer to the string \tcode{"generic"}. +\remarks +The object's \tcode{default_error_condition} and \tcode{equivalent} virtual functions shall behave as specified for the class \tcode{error_category}. The object's \tcode{name} virtual function shall return a pointer to the string \tcode{"generic"}. \end{itemdescr} \indexlibrary{\idxcode{system_category}}% @@ -1016,11 +1028,13 @@ \begin{itemdescr} \pnum -\returns A reference to an object of a type derived from class \tcode{error_category}. +\returns +A reference to an object of a type derived from class \tcode{error_category}. All calls to this function shall return references to the same object. \pnum -\remarks The object's \tcode{equivalent} virtual functions shall behave as specified for +\remarks +The object's \tcode{equivalent} virtual functions shall behave as specified for class \tcode{error_category}. The object's \tcode{name} virtual function shall return a pointer to the string \tcode{"system"}. The object's \tcode{default_error_condition} virtual function shall behave as follows: @@ -1091,7 +1105,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{val_ == 0} and \tcode{cat_ == \&system_category()}. +\ensures +\tcode{val_ == 0} and \tcode{cat_ == \&system_category()}. \end{itemdescr} \indexlibrary{\idxcode{error_code}!constructor}% @@ -1101,7 +1116,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{val_ == val} and \tcode{cat_ == \&cat}. +\ensures +\tcode{val_ == val} and \tcode{cat_ == \&cat}. \end{itemdescr} \indexlibrary{\idxcode{error_code}!constructor}% @@ -1115,7 +1131,8 @@ \constraints \tcode{is_error_code_enum_v} is \tcode{true}. \pnum -\ensures \tcode{*this == make_error_code(e)}. +\ensures +\tcode{*this == make_error_code(e)}. \end{itemdescr} \rSec3[syserr.errcode.modifiers]{Modifiers} @@ -1127,7 +1144,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{val_ == val} and \tcode{cat_ == \&cat}. +\ensures +\tcode{val_ == val} and \tcode{cat_ == \&cat}. \end{itemdescr} \indexlibrarymember{operator=}{error_code}% @@ -1141,10 +1159,12 @@ \constraints \tcode{is_error_code_enum_v} is \tcode{true}. \pnum -\ensures \tcode{*this == make_error_code(e)}. +\ensures +\tcode{*this == make_error_code(e)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{clear}{error_code}% @@ -1154,7 +1174,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{value() == 0} and \tcode{category() == system_category()}. +\ensures +\tcode{value() == 0} and \tcode{category() == system_category()}. \end{itemdescr} @@ -1167,7 +1188,8 @@ \begin{itemdescr} \pnum -\returns \tcode{val_}. +\returns +\tcode{val_}. \end{itemdescr} \indexlibrarymember{category}{error_code}% @@ -1177,7 +1199,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*cat_}. +\returns +\tcode{*cat_}. \end{itemdescr} \indexlibrarymember{default_error_condition}{error_code}% @@ -1187,7 +1210,8 @@ \begin{itemdescr} \pnum -\returns \tcode{category().default_error_condition(value())}. +\returns +\tcode{category().default_error_condition(value())}. \end{itemdescr} \indexlibrarymember{message}{error_code}% @@ -1197,7 +1221,8 @@ \begin{itemdescr} \pnum -\returns \tcode{category().message(value())}. +\returns +\tcode{category().message(value())}. \end{itemdescr} \indexlibrarymember{operator bool}{error_code}% @@ -1207,7 +1232,8 @@ \begin{itemdescr} \pnum -\returns \tcode{value() != 0}. +\returns +\tcode{value() != 0}. \end{itemdescr} \rSec3[syserr.errcode.nonmembers]{Non-member functions} @@ -1219,7 +1245,8 @@ \begin{itemdescr} \pnum -\returns \tcode{error_code(static_cast(e), generic_category())}. +\returns +\tcode{error_code(static_cast(e), generic_category())}. \end{itemdescr} \indexlibrarymember{operator<<}{error_code}% @@ -1283,7 +1310,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{val_ == 0} and \tcode{cat_ == \&generic_category()}. +\ensures +\tcode{val_ == 0} and \tcode{cat_ == \&generic_category()}. \end{itemdescr} \indexlibrary{\idxcode{error_condition}!constructor}% @@ -1293,7 +1321,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{val_ == val} and \tcode{cat_ == \&cat}. +\ensures +\tcode{val_ == val} and \tcode{cat_ == \&cat}. \end{itemdescr} \indexlibrary{\idxcode{error_condition}!constructor}% @@ -1307,7 +1336,8 @@ \constraints \tcode{is_error_condition_enum_v} is \tcode{true}. \pnum -\ensures \tcode{*this == make_error_condition(e)}. +\ensures +\tcode{*this == make_error_condition(e)}. \end{itemdescr} @@ -1320,7 +1350,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{val_ == val} and \tcode{cat_ == \&cat}. +\ensures +\tcode{val_ == val} and \tcode{cat_ == \&cat}. \end{itemdescr} \indexlibrarymember{operator=}{error_condition}% @@ -1334,10 +1365,12 @@ \constraints \tcode{is_error_condition_enum_v} is \tcode{true}. \pnum -\ensures \tcode{*this == make_error_condition(e)}. +\ensures +\tcode{*this == make_error_condition(e)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{clear}{error_condition}% @@ -1347,7 +1380,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{value() == 0} and \tcode{category() == generic_category()}. +\ensures +\tcode{value() == 0} and \tcode{category() == generic_category()}. \end{itemdescr} \rSec3[syserr.errcondition.observers]{Observers} @@ -1359,7 +1393,8 @@ \begin{itemdescr} \pnum -\returns \tcode{val_}. +\returns +\tcode{val_}. \end{itemdescr} \indexlibrarymember{category}{error_condition}% @@ -1369,7 +1404,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*cat_}. +\returns +\tcode{*cat_}. \end{itemdescr} \indexlibrarymember{message}{error_condition}% @@ -1379,7 +1415,8 @@ \begin{itemdescr} \pnum -\returns \tcode{category().message(value())}. +\returns +\tcode{category().message(value())}. \end{itemdescr} \indexlibrarymember{operator bool}{error_condition}% @@ -1389,7 +1426,8 @@ \begin{itemdescr} \pnum -\returns \tcode{value() != 0}. +\returns +\tcode{value() != 0}. \end{itemdescr} \rSec3[syserr.errcondition.nonmembers]{Non-member functions} @@ -1401,7 +1439,8 @@ \begin{itemdescr} \pnum -\returns \tcode{error_condition(static_cast(e), generic_category())}. +\returns +\tcode{error_condition(static_cast(e), generic_category())}. \end{itemdescr} \rSec2[syserr.compare]{Comparison functions} @@ -1530,7 +1569,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{code() == ec} and\newline +\ensures +\tcode{code() == ec} and\newline \tcode{string_view(what()).find(what_arg.c_str()) != string_view::npos}. \end{itemdescr} @@ -1541,7 +1581,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{code() == ec} and +\ensures +\tcode{code() == ec} and \tcode{string_view(what()).find(what_arg) != string_view::npos}. \end{itemdescr} @@ -1552,7 +1593,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{code() == ec}. +\ensures +\tcode{code() == ec}. \end{itemdescr} \indexlibrary{\idxcode{system_error}!constructor}% @@ -1562,7 +1604,8 @@ \begin{itemdescr} \pnum -\ensures \raggedright \tcode{code() == error_code(ev, ecat)} and\linebreak +\ensures +\raggedright \tcode{code() == error_code(ev, ecat)} and\linebreak \tcode{string_view(what()).find(what_arg.c_str()) != string_view::npos}. \end{itemdescr} @@ -1573,7 +1616,8 @@ \begin{itemdescr} \pnum -\ensures \raggedright \tcode{code() == error_code(ev, ecat)} and\linebreak +\ensures +\raggedright \tcode{code() == error_code(ev, ecat)} and\linebreak \tcode{string_view(what()).find(what_arg) != string_view::npos}. \end{itemdescr} @@ -1584,7 +1628,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{code() == error_code(ev, ecat)}. +\ensures +\tcode{code() == error_code(ev, ecat)}. \end{itemdescr} \indexlibrarymember{code}{system_error}% @@ -1594,7 +1639,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ec} or \tcode{error_code(ev, ecat)}, from the constructor, +\returns +\tcode{ec} or \tcode{error_code(ev, ecat)}, from the constructor, as appropriate. \end{itemdescr} @@ -1605,7 +1651,8 @@ \begin{itemdescr} \pnum -\returns An \ntbs{} incorporating the arguments supplied in the constructor. +\returns +An \ntbs{} incorporating the arguments supplied in the constructor. \begin{note} The returned \ntbs{} might be the contents of \tcode{what_arg + ": " + code.message()}.\end{note} diff --git a/source/future.tex b/source/future.tex index 8b5919eb59..0bdcef3cc7 100644 --- a/source/future.tex +++ b/source/future.tex @@ -1575,7 +1575,8 @@ \begin{itemdescr} \pnum -\returns \tcode{current}. +\returns +\tcode{current}. \end{itemdescr} \rSec1[depr.util.smartptr.shared.atomic]{Deprecated \tcode{shared_ptr} atomic access} @@ -1637,10 +1638,12 @@ \requires \tcode{p} shall not be null. \pnum -\returns \tcode{true} if atomic access to \tcode{*p} is lock-free, \tcode{false} otherwise. +\returns +\tcode{true} if atomic access to \tcode{*p} is lock-free, \tcode{false} otherwise. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{atomic_load}{shared_ptr}% @@ -1653,10 +1656,12 @@ \requires \tcode{p} shall not be null. \pnum -\returns \tcode{atomic_load_explicit(p, memory_order_seq_cst)}. +\returns +\tcode{atomic_load_explicit(p, memory_order_seq_cst)}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{atomic_load_explicit}{shared_ptr}% @@ -1672,10 +1677,12 @@ \requires \tcode{mo} shall not be \tcode{memory_order_release} or \tcode{memory_order_acq_rel}. \pnum -\returns \tcode{*p}. +\returns +\tcode{*p}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{atomic_store}{shared_ptr}% @@ -1688,10 +1695,12 @@ \requires \tcode{p} shall not be null. \pnum -\effects As if by \tcode{atomic_store_explicit(p, r, memory_order_seq_cst)}. +\effects +As if by \tcode{atomic_store_explicit(p, r, memory_order_seq_cst)}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{atomic_store_explicit}{shared_ptr}% @@ -1707,10 +1716,12 @@ \requires \tcode{mo} shall not be \tcode{memory_order_acquire} or \tcode{memory_order_acq_rel}. \pnum -\effects As if by \tcode{p->swap(r)}. +\effects +As if by \tcode{p->swap(r)}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{atomic_exchange}{shared_ptr}% @@ -1723,10 +1734,12 @@ \requires \tcode{p} shall not be null. \pnum -\returns \tcode{atomic_exchange_explicit(p, r, memory_order_seq_cst)}. +\returns +\tcode{atomic_exchange_explicit(p, r, memory_order_seq_cst)}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{atomic_exchange_explicit}{shared_ptr}% @@ -1740,13 +1753,16 @@ \requires \tcode{p} shall not be null. \pnum -\effects As if by \tcode{p->swap(r)}. +\effects +As if by \tcode{p->swap(r)}. \pnum -\returns The previous value of \tcode{*p}. +\returns +The previous value of \tcode{*p}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{atomic_compare_exchange_weak}{shared_ptr}% @@ -1766,7 +1782,8 @@ \end{codeblock} \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{atomic_compare_exchange_strong}{shared_ptr}% @@ -1803,19 +1820,23 @@ \tcode{memory_order_acq_rel}. \pnum -\effects If \tcode{*p} is equivalent to \tcode{*v}, assigns \tcode{w} to +\effects +If \tcode{*p} is equivalent to \tcode{*v}, assigns \tcode{w} to \tcode{*p} and has synchronization semantics corresponding to the value of \tcode{success}, otherwise assigns \tcode{*p} to \tcode{*v} and has synchronization semantics corresponding to the value of \tcode{failure}. \pnum -\returns \tcode{true} if \tcode{*p} was equivalent to \tcode{*v}, \tcode{false} otherwise. +\returns +\tcode{true} if \tcode{*p} was equivalent to \tcode{*v}, \tcode{false} otherwise. \pnum -\throws Nothing. +\throws +Nothing. \pnum -\remarks Two \tcode{shared_ptr} objects are equivalent if they store the same +\remarks +Two \tcode{shared_ptr} objects are equivalent if they store the same pointer value and share ownership. The weak form may fail spuriously. See~\ref{atomics.types.operations}. \end{itemdescr} @@ -2087,7 +2108,8 @@ \begin{itemdescr} \pnum -\returns \tcode{cvtcount}. +\returns +\tcode{cvtcount}. \end{itemdescr} \indexlibrarymember{from_bytes}{wstring_convert}% @@ -2241,7 +2263,8 @@ \begin{itemdescr} \pnum -\effects The destructor shall delete \tcode{cvtptr}. +\effects +The destructor shall delete \tcode{cvtptr}. \end{itemdescr} \rSec2[depr.conversions.buffer]{Class template \tcode{wbuffer_convert}} @@ -2310,7 +2333,8 @@ \begin{itemdescr} \pnum -\returns \tcode{cvtstate}. +\returns +\tcode{cvtstate}. \end{itemdescr} \indexlibrarymember{rdbuf}{wbuffer_convert}% @@ -2320,7 +2344,8 @@ \begin{itemdescr} \pnum -\returns \tcode{bufptr}. +\returns +\tcode{bufptr}. \end{itemdescr} \indexlibrarymember{rdbuf}{wbuffer_convert}% @@ -2330,10 +2355,12 @@ \begin{itemdescr} \pnum -\effects Stores \tcode{bytebuf} in \tcode{bufptr}. +\effects +Stores \tcode{bytebuf} in \tcode{bufptr}. \pnum -\returns The previous value of \tcode{bufptr}. +\returns +The previous value of \tcode{bufptr}. \end{itemdescr} \indexlibrarymember{state_type}{wbuffer_convert}% @@ -2360,7 +2387,8 @@ \tcode{pcvt != nullptr}. \pnum -\effects The constructor constructs a stream buffer object, initializes +\effects +The constructor constructs a stream buffer object, initializes \tcode{bufptr} to \tcode{bytebuf}, initializes \tcode{cvtptr} to \tcode{pcvt}, and initializes \tcode{cvtstate} to \tcode{state}. \end{itemdescr} @@ -2372,7 +2400,8 @@ \begin{itemdescr} \pnum -\effects The destructor shall delete \tcode{cvtptr}. +\effects +The destructor shall delete \tcode{cvtptr}. \end{itemdescr} \rSec1[depr.locale.category]{Deprecated locale category facets} @@ -2442,7 +2471,8 @@ \end{itemize} \pnum -\remarks Argument format conversion\iref{fs.path.fmt.cvt} applies to the +\remarks +Argument format conversion\iref{fs.path.fmt.cvt} applies to the arguments for these functions. How Unicode encoding conversions are performed is unspecified. diff --git a/source/iostreams.tex b/source/iostreams.tex index 969e91d3be..f0c8b8b616 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -2160,7 +2160,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{*this} shall have the state that +\ensures +\tcode{*this} shall have the state that \tcode{rhs} had before the function call, except that \tcode{rdbuf()} shall return 0. \tcode{rhs} shall be in a valid but unspecified state, except that \tcode{rhs.rdbuf()} shall return the @@ -2175,7 +2176,8 @@ \begin{itemdescr} \pnum -\effects The states of \tcode{*this} and \tcode{rhs} +\effects +The states of \tcode{*this} and \tcode{rhs} shall be exchanged, except that \tcode{rdbuf()} shall return the same value as it returned before the function call, and \tcode{rhs.rdbuf()} shall return the same value as it returned before the function call. @@ -2191,15 +2193,18 @@ \requires \tcode{sb != nullptr}. \pnum -\effects Associates the \tcode{basic_streambuf} object +\effects +Associates the \tcode{basic_streambuf} object pointed to by \tcode{sb} with this stream without calling \tcode{clear()}. \pnum -\ensures \tcode{rdbuf() == sb}. +\ensures +\tcode{rdbuf() == sb}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \rSec3[iostate.flags]{Flags functions} @@ -2211,7 +2216,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!fail()}. +\returns +\tcode{!fail()}. \end{itemdescr} \indexlibrarymember{operator"!}{basic_ios}% @@ -2760,11 +2766,13 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{str.setf(ios_base::fixed | ios_base::scientific, +\effects +Calls \tcode{str.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield)}. \pnum -\returns \tcode{str}. +\returns +\tcode{str}. \end{itemdescr} \pnum @@ -2785,7 +2793,8 @@ Calls \tcode{str.unsetf(ios_base::floatfield)}. \pnum -\returns \tcode{str}. +\returns +\tcode{str}. \end{itemdescr} \rSec2[error.reporting]{Error reporting} @@ -2797,7 +2806,8 @@ \begin{itemdescr} \pnum -\returns \tcode{error_code(static_cast(e), iostream_category())}. +\returns +\tcode{error_code(static_cast(e), iostream_category())}. \end{itemdescr} \indexlibrarymember{make_error_condition}{io_errc}% @@ -2807,7 +2817,8 @@ \begin{itemdescr} \pnum -\returns \tcode{error_condition(static_cast(e), iostream_category())}. +\returns +\tcode{error_condition(static_cast(e), iostream_category())}. \end{itemdescr} \indexlibrary{\idxcode{iostream_category}}% @@ -2817,7 +2828,8 @@ \begin{itemdescr} \pnum -\returns A reference to an object of a type derived from class +\returns +A reference to an object of a type derived from class \tcode{error_category}. \pnum @@ -3108,7 +3120,8 @@ \begin{itemdescr} \pnum -\effects Constructs a copy of \tcode{rhs}. +\effects +Constructs a copy of \tcode{rhs}. \pnum \ensures @@ -3389,7 +3402,8 @@ \begin{itemdescr} \pnum -\effects Assigns the data members of \tcode{rhs} +\effects +Assigns the data members of \tcode{rhs} to \tcode{*this}. \pnum @@ -3406,7 +3420,8 @@ \end{itemize} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_streambuf}% @@ -3416,7 +3431,8 @@ \begin{itemdescr} \pnum -\effects Swaps the data members of \tcode{rhs} +\effects +Swaps the data members of \tcode{rhs} and \tcode{*this}. \end{itemdescr} @@ -4368,7 +4384,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. +\effects +Move constructs from the rvalue \tcode{rhs}. This is accomplished by default constructing the base class, copying the \tcode{gcount()} from \tcode{rhs}, calling \tcode{basic_ios::move(rhs)} to initialize the base @@ -4401,10 +4418,12 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{swap(rhs)}. +\effects +As if by \tcode{swap(rhs)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_istream}% @@ -4414,7 +4433,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{basic_ios::swap(rhs)}. +\effects +Calls \tcode{basic_ios::swap(rhs)}. Exchanges the values returned by \tcode{gcount()} and \tcode{rhs.gcount()}. \end{itemdescr} @@ -5611,14 +5631,16 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} is >> std::forward(x); return is; \end{codeblock} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless the expression \tcode{is >> std::forward(x)} is well-formed. \end{itemdescr} @@ -5693,7 +5715,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs} by +\effects +Move constructs from the rvalue \tcode{rhs} by constructing the \tcode{basic_istream} base class with \tcode{move(rhs)}. \end{itemdescr} @@ -5726,7 +5749,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{swap(rhs)}. +\effects +As if by \tcode{swap(rhs)}. \end{itemdescr} \indexlibrarymember{swap}{basic_iostream}% @@ -5736,7 +5760,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{basic_istream::swap(rhs)}. +\effects +Calls \tcode{basic_istream::swap(rhs)}. \end{itemdescr} @@ -5962,7 +5987,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. +\effects +Move constructs from the rvalue \tcode{rhs}. This is accomplished by default constructing the base class and calling \tcode{basic_ios::move(rhs)} to initialize the base class. @@ -5994,10 +6020,12 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{swap(rhs)}. +\effects +As if by \tcode{swap(rhs)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_ostream}% @@ -6007,7 +6035,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{basic_ios::swap(rhs)}. +\effects +Calls \tcode{basic_ios::swap(rhs)}. \end{itemdescr} \rSec4[ostream.sentry]{Class \tcode{basic_ostream::sentry}} @@ -6671,7 +6700,8 @@ \begin{itemdescr} \pnum -\effects Behaves as an unformatted output function (as described above). +\effects +Behaves as an unformatted output function (as described above). If \tcode{rdbuf()} is not a null pointer, @@ -6827,13 +6857,16 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{os << x;} +\effects +As if by: \tcode{os << x;} \pnum -\returns \tcode{os}. +\returns +\tcode{os}. \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless the expression \tcode{os << x} is well-formed. \end{itemdescr} @@ -6852,7 +6885,8 @@ \begin{itemdescr} \pnum -\returns An object of +\returns +An object of unspecified type such that if \tcode{out} is an object of type \tcode{basic_ostream} then the expression \tcode{out << resetiosflags(mask)} behaves as if it called @@ -7120,11 +7154,13 @@ specialization of the \tcode{basic_string} template\iref{strings}. \pnum -\effects The expression \tcode{in >> get_money(mon, intl)} described below +\effects +The expression \tcode{in >> get_money(mon, intl)} described below behaves as a formatted input function\iref{istream.formatted.reqmts}. \pnum -\returns An object of unspecified type such that if +\returns +An object of unspecified type such that if \tcode{in} is an object of type \tcode{basic_istream} then the expression \tcode{in >> get_money(mon, intl)} behaves as if it called \tcode{f(in, mon, intl)}, where the function \tcode{f} is defined as: @@ -7160,7 +7196,8 @@ specialization of the \tcode{basic_string} template\iref{strings}. \pnum -\returns An object of unspecified type such that if +\returns +An object of unspecified type such that if \tcode{out} is an object of type \tcode{basic_ostream} then the expression \tcode{out << put_money(mon, intl)} behaves as a formatted output function\iref{ostream.formatted.reqmts} that calls @@ -7196,7 +7233,8 @@ The argument \tcode{fmt} shall be a valid pointer to an array of objects of type \tcode{charT} with \tcode{char_traits::length(fmt)} elements. \pnum -\returns An object of unspecified type such that if \tcode{in} is an object of type +\returns +An object of unspecified type such that if \tcode{in} is an object of type \tcode{basic_istream} then the expression \tcode{in >> get_time(tmb, fmt)} behaves as if it called \tcode{f(in, tmb, fmt)}, where the function \tcode{f} is defined as: @@ -7235,7 +7273,8 @@ \tcode{char_traits::length(\brk{}fmt)} elements. \pnum -\returns An object of unspecified type such that if \tcode{out} is an object of +\returns +An object of unspecified type such that if \tcode{out} is an object of type \tcode{basic_ostream} then the expression \tcode{out << put_time(tmb, fmt)} behaves as if it called \tcode{f(out, tmb, fmt)}, where the function \tcode{f} is defined as: @@ -7278,7 +7317,8 @@ \begin{itemdescr} \pnum -\returns An object of unspecified type such that if \tcode{out} is an instance +\returns +An object of unspecified type such that if \tcode{out} is an instance of \tcode{basic_ostream} with member type \tcode{char_type} the same as \tcode{charT} and with member type \tcode{traits_type}, which in the second and third forms is the same as \tcode{traits}, then the expression @@ -7311,7 +7351,8 @@ \begin{itemdescr} \pnum -\returns An object of unspecified type such that: +\returns +An object of unspecified type such that: \begin{itemize} \item If \tcode{in} is an instance of \tcode{basic_istream} with member types \tcode{char_type} and \tcode{traits_type} the same as \tcode{charT} @@ -7665,7 +7706,8 @@ the values which \tcode{rhs} had. \pnum -\ensures Let \tcode{rhs_p} refer to the state of +\ensures +Let \tcode{rhs_p} refer to the state of \tcode{rhs} just prior to this construction and let \tcode{rhs_a} refer to the state of \tcode{rhs} just after this construction. @@ -7696,11 +7738,13 @@ \begin{itemdescr} \pnum -\effects After the move assignment \tcode{*this} has the observable state it would +\effects +After the move assignment \tcode{*this} has the observable state it would have had if it had been move constructed from \tcode{rhs} (see~\ref{stringbuf.cons}). \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_stringbuf}% @@ -7710,16 +7754,19 @@ \begin{itemdescr} \pnum -\expects \tcode{allocator_traits::propagate_on_container_swap::value} +\expects +\tcode{allocator_traits::propagate_on_container_swap::value} is \tcode{true} or \tcode{get_allocator() == s.get_allocator()} is \tcode{true}. \pnum -\effects Exchanges the state of \tcode{*this} +\effects +Exchanges the state of \tcode{*this} and \tcode{rhs}. \pnum -\remarks The expression inside \tcode{noexcept} is equivalent to:\\ +\remarks +The expression inside \tcode{noexcept} is equivalent to:\\ \tcode{allocator_traits::propagate_on_container_swap::value ||}\\ \tcode{allocator_traits::is_always_equal::value}. \end{itemdescr} @@ -7733,7 +7780,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec3[stringbuf.members]{Member functions} @@ -7798,7 +7846,8 @@ \begin{itemdescr} \pnum -\returns \tcode{buf.get_allocator()}. +\returns +\tcode{buf.get_allocator()}. \end{itemdescr} \indexlibrarymember{str}{basic_stringbuf}% @@ -7808,7 +7857,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return basic_string(view(), get_allocator()); \end{codeblock} @@ -7826,7 +7876,8 @@ qualifies as an allocator\iref{container.requirements.general}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return basic_string(view(), sa); \end{codeblock} @@ -7909,7 +7960,8 @@ \constraints \tcode{is_same_v} is \tcode{false}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} buf = s; init_buf_ptrs(); @@ -7923,7 +7975,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} buf = std::move(s); init_buf_ptrs(); @@ -8385,7 +8438,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. This +\effects +Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_stringbuf}. Next \tcode{basic_istream::set_rdbuf(addressof(sb))} @@ -8402,11 +8456,13 @@ \begin{itemdescr} \pnum -\effects Move assigns the base and members of \tcode{*this} from the base and corresponding +\effects +Move assigns the base and members of \tcode{*this} from the base and corresponding members of \tcode{rhs}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_istringstream}% @@ -8416,7 +8472,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} basic_istream::swap(rhs); sb.swap(rhs.sb); @@ -8433,7 +8490,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec3[istringstream.members]{Member functions} @@ -8456,7 +8514,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return rdbuf()->str();} +\effects +Equivalent to: \tcode{return rdbuf()->str();} \end{itemdescr} \indexlibrarymember{str}{basic_istringstream}% @@ -8467,7 +8526,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return rdbuf()->str(sa);} +\effects +Equivalent to: \tcode{return rdbuf()->str(sa);} \end{itemdescr} \indexlibrarymember{str}{basic_istringstream}% @@ -8477,7 +8537,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return std::move(*rdbuf()).str();} +\effects +Equivalent to: \tcode{return std::move(*rdbuf()).str();} \end{itemdescr} \indexlibrarymember{view}{basic_istringstream}% @@ -8487,7 +8548,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return rdbuf()->view();} +\effects +Equivalent to: \tcode{return rdbuf()->view();} \end{itemdescr} \indexlibrarymember{str}{basic_istringstream}% @@ -8713,7 +8775,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. This +\effects +Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_stringbuf}. Next \tcode{basic_ostream::set_rdbuf(addressof(sb))} @@ -8730,11 +8793,13 @@ \begin{itemdescr} \pnum -\effects Move assigns the base and members of \tcode{*this} from the base and corresponding +\effects +Move assigns the base and members of \tcode{*this} from the base and corresponding members of \tcode{rhs}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_ostringstream}% @@ -8744,7 +8809,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} basic_ostream::swap(rhs); sb.swap(rhs.sb); @@ -8760,7 +8826,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec3[ostringstream.members]{Member functions} @@ -9050,7 +9117,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. This +\effects +Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_stringbuf}. Next \tcode{basic_istream::set_rdbuf(addressof(sb))} is called to @@ -9066,11 +9134,13 @@ \begin{itemdescr} \pnum -\effects Move assigns the base and members of \tcode{*this} from the base and corresponding +\effects +Move assigns the base and members of \tcode{*this} from the base and corresponding members of \tcode{rhs}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_stringstream}% @@ -9097,7 +9167,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec3[stringstream.members]{Member functions} @@ -9392,7 +9463,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. It +\effects +Move constructs from the rvalue \tcode{rhs}. It is \impldef{whether sequence pointers are copied by \tcode{basic_filebuf} move constructor} whether the sequence pointers in \tcode{*this} (\tcode{eback()}, \tcode{gptr()}, \tcode{egptr()}, @@ -9406,7 +9478,8 @@ copied. \pnum -\ensures Let \tcode{rhs_p} refer to the state of +\ensures +Let \tcode{rhs_p} refer to the state of \tcode{rhs} just prior to this construction and let \tcode{rhs_a} refer to the state of \tcode{rhs} just after this construction. @@ -9450,12 +9523,14 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{close()} then move assigns from \tcode{rhs}. After the +\effects +Calls \tcode{close()} then move assigns from \tcode{rhs}. After the move assignment \tcode{*this} has the observable state it would have had if it had been move constructed from \tcode{rhs} (see~\ref{filebuf.cons}). \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_filebuf}% @@ -9465,7 +9540,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the state of \tcode{*this} +\effects +Exchanges the state of \tcode{*this} and \tcode{rhs}. \end{itemdescr} @@ -9478,7 +9554,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec3[filebuf.members]{Member functions} @@ -10146,7 +10223,8 @@ \begin{itemdescr} \pnum -\effects The same as \tcode{basic_ifstream(s.c_str(), mode)}. +\effects +The same as \tcode{basic_ifstream(s.c_str(), mode)}. \end{itemdescr} \indexlibrary{\idxcode{basic_ifstream}!constructor}% @@ -10156,7 +10234,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. This +\effects +Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_filebuf}. Next \tcode{basic_istream::set_rdbuf(\brk{}addressof(sb))} @@ -10173,11 +10252,13 @@ \begin{itemdescr} \pnum -\effects Move assigns the base and members of \tcode{*this} from the base and corresponding +\effects +Move assigns the base and members of \tcode{*this} from the base and corresponding members of \tcode{rhs}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_ifstream}% @@ -10187,7 +10268,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the state of \tcode{*this} +\effects +Exchanges the state of \tcode{*this} and \tcode{rhs} by calling \tcode{basic_istream::swap(rhs)} and \tcode{sb.swap(rhs.sb)}. @@ -10202,7 +10284,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec3[ifstream.members]{Member functions} @@ -10257,7 +10340,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{open(s.c_str(), mode)}. +\effects +Calls \tcode{open(s.c_str(), mode)}. \end{itemdescr} \indexlibrarymember{close}{basic_ifstream}% @@ -10395,7 +10479,8 @@ \begin{itemdescr} \pnum -\effects The same as \tcode{basic_ofstream(s.c_str(), mode)}. +\effects +The same as \tcode{basic_ofstream(s.c_str(), mode)}. \end{itemdescr} \indexlibrary{\idxcode{basic_ofstream}!constructor}% @@ -10405,7 +10490,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. This +\effects +Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_filebuf}. Next \tcode{basic_ostream::set_rdbuf(\brk{}addressof(sb))} @@ -10422,11 +10508,13 @@ \begin{itemdescr} \pnum -\effects Move assigns the base and members of \tcode{*this} from the base and corresponding +\effects +Move assigns the base and members of \tcode{*this} from the base and corresponding members of \tcode{rhs}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_ofstream}% @@ -10436,7 +10524,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the state of \tcode{*this} +\effects +Exchanges the state of \tcode{*this} and \tcode{rhs} by calling \tcode{basic_ostream::swap(rhs)} and \tcode{sb.swap(rhs.sb)}. @@ -10451,7 +10540,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec3[ofstream.members]{Member functions} @@ -10522,7 +10612,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{open(s.c_str(), mode)}. +\effects +Calls \tcode{open(s.c_str(), mode)}. \end{itemdescr} \rSec2[fstream]{Class template \tcode{basic_fstream}} @@ -10661,7 +10752,8 @@ \begin{itemdescr} \pnum -\effects The same as \tcode{basic_fstream(s.c_str(), mode)}. +\effects +The same as \tcode{basic_fstream(s.c_str(), mode)}. \end{itemdescr} \indexlibrary{\idxcode{basic_fstream}!constructor}% @@ -10671,7 +10763,8 @@ \begin{itemdescr} \pnum -\effects Move constructs from the rvalue \tcode{rhs}. This +\effects +Move constructs from the rvalue \tcode{rhs}. This is accomplished by move constructing the base class, and the contained \tcode{basic_filebuf}. Next \tcode{basic_istream::set_rdbuf(\brk{}addressof(sb))} @@ -10688,11 +10781,13 @@ \begin{itemdescr} \pnum -\effects Move assigns the base and members of \tcode{*this} from the base and corresponding +\effects +Move assigns the base and members of \tcode{*this} from the base and corresponding members of \tcode{rhs}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{basic_fstream}% @@ -10702,7 +10797,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the state of \tcode{*this} +\effects +Exchanges the state of \tcode{*this} and \tcode{rhs} by calling \tcode{basic_iostream::swap(rhs)} and \tcode{sb.swap(rhs.sb)}. @@ -10717,7 +10813,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec3[fstream.members]{Member functions} @@ -10778,7 +10875,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{open(s.c_str(), mode)}. +\effects +Calls \tcode{open(s.c_str(), mode)}. \end{itemdescr} \indexlibrarymember{close}{basic_fstream}% @@ -12369,10 +12467,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{path}. +\effects +Constructs an object of class \tcode{path}. \pnum -\ensures \tcode{empty() == true}. +\ensures +\tcode{empty() == true}. \end{itemdescr} \indexlibrary{\idxcode{path}!constructor}% @@ -12415,7 +12515,8 @@ \begin{itemdescr} \pnum -\effects Let \tcode{s} be the effective range of \tcode{source}\iref{fs.path.req} +\effects +Let \tcode{s} be the effective range of \tcode{source}\iref{fs.path.req} or the range \range{first}{last}, with the encoding converted if required\iref{fs.path.cvt}. Finds the detected-format of \tcode{s}\iref{fs.path.fmt.cvt} and constructs an object of class \tcode{path} @@ -12437,7 +12538,8 @@ \tcode{char}. \pnum -\effects Let \tcode{s} be the effective range of \tcode{source} +\effects +Let \tcode{s} be the effective range of \tcode{source} or the range \range{first}{last}, after converting the encoding as follows: @@ -12495,14 +12597,16 @@ \begin{itemdescr} \pnum -\effects If \tcode{*this} and \tcode{p} are the same +\effects +If \tcode{*this} and \tcode{p} are the same object, has no effect. Otherwise, sets both respective pathnames of \tcode{*this} to the respective pathnames of \tcode{p}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{path}% @@ -12512,7 +12616,8 @@ \begin{itemdescr} \pnum -\effects If \tcode{*this} and \tcode{p} are the same +\effects +If \tcode{*this} and \tcode{p} are the same object, has no effect. Otherwise, sets both respective pathnames of \tcode{*this} to the respective pathnames of \tcode{p}. @@ -12520,7 +12625,8 @@ \begin{note} A valid implementation is \tcode{swap(p)}. \end{note} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{path}% @@ -12532,12 +12638,14 @@ \begin{itemdescr} \pnum -\effects Sets the pathname in the detected-format of \tcode{source} +\effects +Sets the pathname in the detected-format of \tcode{source} to the original value of \tcode{source}. \tcode{source} is left in a valid but unspecified state. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{path}% @@ -12560,7 +12668,8 @@ and sets the pathname in that format to \tcode{s}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec4[fs.path.append]{Appends} @@ -12576,7 +12685,8 @@ \begin{itemdescr} \pnum -\effects If \tcode{p.is_absolute() || (p.has_root_name() \&\& p.root_name() != root_name())}, +\effects +If \tcode{p.is_absolute() || (p.has_root_name() \&\& p.root_name() != root_name())}, then \tcode{operator=(p)}. \pnum @@ -12619,7 +12729,8 @@ \end{example} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator/=}{path}% @@ -12633,7 +12744,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return operator/=(path(source));} +\effects +Equivalent to: \tcode{return operator/=(path(source));} \end{itemdescr} \indexlibrarymember{operator/=}{path}% @@ -12645,7 +12757,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return operator/=(path(first, last));} +\effects +Equivalent to: \tcode{return operator/=(path(first, last));} \end{itemdescr} \rSec4[fs.path.concat]{Concatenation} @@ -12665,14 +12778,16 @@ \begin{itemdescr} \pnum -\effects Appends \tcode{path(x).native()} to the pathname in the native format. +\effects +Appends \tcode{path(x).native()} to the pathname in the native format. \begin{note} This directly manipulates the value of \tcode{native()} and may not be portable between operating systems. \end{note} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator+=}{path}% @@ -12685,7 +12800,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *this += basic_string_view(\&x, 1);} +\effects +Equivalent to: \tcode{return *this += basic_string_view(\&x, 1);} \end{itemdescr} \indexlibrarymember{concat}{path}% @@ -12696,7 +12812,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *this += path(first, last);} +\effects +Equivalent to: \tcode{return *this += path(first, last);} \end{itemdescr} \rSec4[fs.path.modifiers]{Modifiers} @@ -12708,7 +12825,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{empty() == true}. +\ensures +\tcode{empty() == true}. \end{itemdescr} \indexlibrarymember{make_preferred}{path}% @@ -12718,12 +12836,14 @@ \begin{itemdescr} \pnum -\effects Each \grammarterm{directory-separator} +\effects +Each \grammarterm{directory-separator} of the pathname in the generic format is converted to \grammarterm{preferred-separator}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum \begin{example} @@ -12755,13 +12875,16 @@ \begin{itemdescr} \pnum -\ensures \tcode{!has_filename()}. +\ensures +\tcode{!has_filename()}. \pnum -\effects Remove the generic format pathname of \tcode{filename()} from the generic format pathname. +\effects +Remove the generic format pathname of \tcode{filename()} from the generic format pathname. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum \begin{example} @@ -12789,7 +12912,8 @@ \end{codeblock} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum \begin{example} @@ -12819,7 +12943,8 @@ \end{itemize} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{path}% @@ -12829,10 +12954,12 @@ \begin{itemdescr} \pnum -\effects Swaps the contents (in all formats) of the two paths. +\effects +Swaps the contents (in all formats) of the two paths. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \rSec4[fs.path.native.obs]{Native format observers} @@ -12847,7 +12974,8 @@ \begin{itemdescr} \pnum -\returns The pathname in the native format. +\returns +The pathname in the native format. \end{itemdescr} \indexlibrarymember{c_str}{path}% @@ -12857,7 +12985,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return native().c_str();} +\effects +Equivalent to: \tcode{return native().c_str();} \end{itemdescr} \indexlibrarymember{operator string_type}{path}% @@ -12867,7 +12996,8 @@ \begin{itemdescr} \pnum -\returns \tcode{native()}. +\returns +\tcode{native()}. \pnum \begin{note} Conversion to \tcode{string_type} is provided so that an @@ -12885,10 +13015,12 @@ \begin{itemdescr} \pnum -\returns \tcode{native()}. +\returns +\tcode{native()}. \pnum -\remarks All memory allocation, including for the return value, shall +\remarks +All memory allocation, including for the return value, shall be performed by \tcode{a}. Conversion, if any, is specified by \ref{fs.path.cvt}. \end{itemdescr} @@ -12908,10 +13040,12 @@ \begin{itemdescr} \pnum -\returns \tcode{native()}. +\returns +\tcode{native()}. \pnum -\remarks Conversion, if any, is performed as specified +\remarks +Conversion, if any, is performed as specified by \ref{fs.path.cvt}. \end{itemdescr} @@ -12942,10 +13076,12 @@ \begin{itemdescr} \pnum -\returns The pathname in the generic format. +\returns +The pathname in the generic format. \pnum -\remarks All memory allocation, including for the return value, shall +\remarks +All memory allocation, including for the return value, shall be performed by \tcode{a}. Conversion, if any, is specified by \ref{fs.path.cvt}. \end{itemdescr} @@ -12965,10 +13101,12 @@ \begin{itemdescr} \pnum -\returns The pathname in the generic format. +\returns +The pathname in the generic format. \pnum -\remarks Conversion, if any, is specified by~\ref{fs.path.cvt}. +\remarks +Conversion, if any, is specified by~\ref{fs.path.cvt}. \end{itemdescr} \rSec4[fs.path.compare]{Compare} @@ -13021,7 +13159,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return compare(path(s));} +\effects +Equivalent to: \tcode{return compare(path(s));} \end{itemdescr} \rSec4[fs.path.decompose]{Decomposition} @@ -13033,7 +13172,8 @@ \begin{itemdescr} \pnum -\returns \grammarterm{root-name}, if the pathname in the generic format +\returns +\grammarterm{root-name}, if the pathname in the generic format includes \grammarterm{root-name}, otherwise \tcode{path()}. \end{itemdescr} @@ -13044,7 +13184,8 @@ \begin{itemdescr} \pnum -\returns \grammarterm{root-directory}, if the pathname in the generic format +\returns +\grammarterm{root-directory}, if the pathname in the generic format includes \grammarterm{root-directory}, otherwise \tcode{path()}. \end{itemdescr} @@ -13055,7 +13196,8 @@ \begin{itemdescr} \pnum -\returns \tcode{root_name() / root_directory()}. +\returns +\tcode{root_name() / root_directory()}. \end{itemdescr} \indexlibrarymember{relative_path}{path}% @@ -13065,7 +13207,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{path} composed from the pathname in the generic format, +\returns +A \tcode{path} composed from the pathname in the generic format, if \tcode{empty()} is \tcode{false}, beginning with the first \grammarterm{filename} after \tcode{root_path()}. Otherwise, \tcode{path()}. \end{itemdescr} @@ -13077,7 +13220,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*this} if \tcode{has_relative_path()} is \tcode{false}, +\returns +\tcode{*this} if \tcode{has_relative_path()} is \tcode{false}, otherwise a path whose generic format pathname is the longest prefix of the generic format pathname of \tcode{*this} that produces one fewer element in its iteration. @@ -13090,7 +13234,8 @@ \begin{itemdescr} \pnum -\returns \tcode{relative_path().empty() ? path() : *--end()}. +\returns +\tcode{relative_path().empty() ? path() : *--end()}. \pnum \begin{example} @@ -13113,7 +13258,8 @@ \begin{itemdescr} \pnum -\returns Let \tcode{f} be the generic format pathname of \tcode{filename()}. +\returns +Let \tcode{f} be the generic format pathname of \tcode{filename()}. Returns a path whose pathname in the generic format is \begin{itemize} \item \tcode{f}, if it contains no periods other than a leading period @@ -13142,7 +13288,8 @@ \begin{itemdescr} \pnum -\returns A path whose pathname in the generic format is +\returns +A path whose pathname in the generic format is the suffix of \tcode{filename()} not included in \tcode{stem()}. \pnum @@ -13178,7 +13325,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if the pathname in the generic format is empty, otherwise \tcode{false}. +\returns +\tcode{true} if the pathname in the generic format is empty, otherwise \tcode{false}. \end{itemdescr} \indexlibrarymember{has_root_path}{path}% @@ -13188,7 +13336,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!root_path().empty()}. +\returns +\tcode{!root_path().empty()}. \end{itemdescr} \indexlibrarymember{has_root_name}{path}% @@ -13198,7 +13347,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!root_name().empty()}. +\returns +\tcode{!root_name().empty()}. \end{itemdescr} \indexlibrarymember{has_root_directory}{path}% @@ -13208,7 +13358,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!root_directory().empty()}. +\returns +\tcode{!root_directory().empty()}. \end{itemdescr} \indexlibrarymember{has_relative_path}{path}% @@ -13218,7 +13369,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!relative_path().empty()}. +\returns +\tcode{!relative_path().empty()}. \end{itemdescr} \indexlibrarymember{has_parent_path}{path}% @@ -13228,7 +13380,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!parent_path().empty()}. +\returns +\tcode{!parent_path().empty()}. \end{itemdescr} \indexlibrarymember{has_filename}{path}% @@ -13238,7 +13391,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!filename().empty()}. +\returns +\tcode{!filename().empty()}. \end{itemdescr} \indexlibrarymember{has_stem}{path}% @@ -13248,7 +13402,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!stem().empty()}. +\returns +\tcode{!stem().empty()}. \end{itemdescr} \indexlibrarymember{has_extension}{path}% @@ -13258,7 +13413,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!extension().empty()}. +\returns +\tcode{!extension().empty()}. \end{itemdescr} \indexlibrarymember{is_absolute}{path}% @@ -13268,7 +13424,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if the pathname in the native format +\returns +\tcode{true} if the pathname in the native format contains an absolute path\iref{fs.class.path}, otherwise \tcode{false}. \pnum @@ -13284,7 +13441,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!is_absolute()}. +\returns +\tcode{!is_absolute()}. \end{itemdescr} \rSec4[fs.path.gen]{Generation} @@ -13296,7 +13454,8 @@ \begin{itemdescr} \pnum -\returns A path whose pathname in the generic format is +\returns +A path whose pathname in the generic format is the normal form\iref{fs.path.generic} of the pathname in the generic format of \tcode{*this}. @@ -13320,7 +13479,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*this} made relative to \tcode{base}. +\returns +\tcode{*this} made relative to \tcode{base}. Does not resolve\iref{fs.class.path} symlinks. Does not first normalize\iref{fs.path.generic} \tcode{*this} or \tcode{base}. @@ -13388,7 +13548,8 @@ \begin{itemdescr} \pnum -\returns If the value of \tcode{lexically_relative(base)} is not an empty path, +\returns +If the value of \tcode{lexically_relative(base)} is not an empty path, return it. Otherwise return \tcode{*this}. \pnum @@ -13448,7 +13609,8 @@ \begin{itemdescr} \pnum -\returns An iterator for the first present element in the traversal +\returns +An iterator for the first present element in the traversal list above. If no elements are present, the end iterator. \end{itemdescr} @@ -13459,7 +13621,8 @@ \begin{itemdescr} \pnum -\returns The end iterator. +\returns +The end iterator. \end{itemdescr} \rSec3[fs.path.io]{Inserter and extractor} @@ -13473,11 +13636,13 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{os << quoted(p.string())}. +\effects +Equivalent to \tcode{os << quoted(p.string())}. \begin{note} The \tcode{quoted} function is described in~\ref{quoted.manip}. \end{note} \pnum -\returns \tcode{os}. +\returns +\tcode{os}. \end{itemdescr} \indexlibrarymember{operator>>}{path}% @@ -13498,7 +13663,8 @@ \end{codeblock} \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec3[fs.path.nonmember]{Non-member functions} @@ -13510,7 +13676,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{lhs.swap(rhs)}. +\effects +Equivalent to \tcode{lhs.swap(rhs)}. \end{itemdescr} \indexlibrary{\idxcode{hash_value}!\idxcode{path}}% @@ -13520,7 +13687,8 @@ \begin{itemdescr} \pnum -\returns A hash value for the path \tcode{p}. If +\returns +A hash value for the path \tcode{p}. If for two paths, \tcode{p1 == p2} then \tcode{hash_value(p1) == hash_value(p2)}. \end{itemdescr} @@ -13531,7 +13699,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.compare(rhs) == 0}. +\returns +\tcode{lhs.compare(rhs) == 0}. \indextext{path equality} \pnum @@ -13558,7 +13727,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.compare(rhs) <=> 0}. +\returns +\tcode{lhs.compare(rhs) <=> 0}. \end{itemdescr} \indexlibrarymember{operator/}{path}% @@ -13568,7 +13738,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return path(lhs) /= rhs;} +\effects +Equivalent to: \tcode{return path(lhs) /= rhs;} \end{itemdescr} \rSec2[fs.class.filesystem.error]{Class \tcode{filesystem_error}} @@ -13656,7 +13827,8 @@ \begin{itemdescr} \pnum -\returns A reference to the copy of \tcode{p1} stored by the +\returns +A reference to the copy of \tcode{p1} stored by the constructor, or, if none, an empty path. \end{itemdescr} @@ -13667,7 +13839,8 @@ \begin{itemdescr} \pnum -\returns A reference to the copy of \tcode{p2} stored by the +\returns +A reference to the copy of \tcode{p2} stored by the constructor, or, if none, an empty path. \end{itemdescr} @@ -13678,7 +13851,8 @@ \begin{itemdescr} \pnum -\returns An \ntbs{} that incorporates +\returns +An \ntbs{} that incorporates the \tcode{what_arg} argument supplied to the constructor. The exact format is unspecified. Implementations should include @@ -13971,7 +14145,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{type() == ft} and \tcode{permissions() == prms}. +\ensures +\tcode{type() == ft} and \tcode{permissions() == prms}. \end{itemdescr} \rSec3[fs.file.status.obs]{Observers} @@ -13983,7 +14158,8 @@ \begin{itemdescr} \pnum -\returns The value of \tcode{type()} specified by the postconditions of the most recent call to a constructor, +\returns +The value of \tcode{type()} specified by the postconditions of the most recent call to a constructor, \tcode{operator=}, or \tcode{type(file_type)} function. \end{itemdescr} @@ -13994,7 +14170,8 @@ \begin{itemdescr} \pnum -\returns The value of \tcode{permissions()} specified by the postconditions of the most recent call to a constructor, +\returns +The value of \tcode{permissions()} specified by the postconditions of the most recent call to a constructor, \tcode{operator=}, or \tcode{permissions(perms)} function. \end{itemdescr} @@ -14007,7 +14184,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{type() == ft}. +\ensures +\tcode{type() == ft}. \end{itemdescr} \indexlibrarymember{permissions}{file_status}% @@ -14017,7 +14195,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{permissions() == prms}. +\ensures +\tcode{permissions() == prms}. \end{itemdescr} \rSec2[fs.class.directory.entry]{Class \tcode{directory_entry}} @@ -14154,15 +14333,18 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{directory_entry}, +\effects +Constructs an object of type \tcode{directory_entry}, then \tcode{refresh()} or \tcode{refresh(ec)}, respectively. \pnum -\ensures \tcode{path() == p} if no error occurs, +\ensures +\tcode{path() == p} if no error occurs, otherwise \tcode{path() == filesystem::path()}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \rSec3[fs.dir.entry.mods]{Modifiers} @@ -14175,12 +14357,14 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{pathobject = p}, +\effects +Equivalent to \tcode{pathobject = p}, then \tcode{refresh()} or \tcode{refresh(ec)}, respectively. If an error occurs, the values of any cached attributes are unspecified. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{replace_filename}{directory_entry}% @@ -14191,11 +14375,13 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{pathobject.replace_filename(p)}, +\effects +Equivalent to \tcode{pathobject.replace_filename(p)}, then \tcode{refresh()} or \tcode{refresh(ec)}, respectively. If an error occurs, the values of any cached attributes are unspecified. -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{refresh}{directory_entry}% @@ -14206,12 +14392,14 @@ \begin{itemdescr} \pnum -\effects Stores the current values of any cached attributes of the file \tcode{p} resolves to. +\effects +Stores the current values of any cached attributes of the file \tcode{p} resolves to. If an error occurs, an error is reported\iref{fs.err.report} and the values of any cached attributes are unspecified. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} @@ -14238,7 +14426,8 @@ \begin{itemdescr} \pnum -\returns \tcode{pathobject}. +\returns +\tcode{pathobject}. \end{itemdescr} \indexlibrarymember{exists}{directory_entry}% @@ -14249,10 +14438,12 @@ \begin{itemdescr} \pnum -\returns \tcode{exists(this->status())} or \tcode{exists(this->status(ec))}, respectively. +\returns +\tcode{exists(this->status())} or \tcode{exists(this->status(ec))}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{is_block_file}{directory_entry}% @@ -14263,10 +14454,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_block_file(this->status())} or \tcode{is_block_file(this->status(ec))}, respectively. +\returns +\tcode{is_block_file(this->status())} or \tcode{is_block_file(this->status(ec))}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{is_character_file}{directory_entry}% @@ -14277,10 +14470,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_character_file(this->status())} or \tcode{is_character_file(this->status(ec))}, respectively. +\returns +\tcode{is_character_file(this->status())} or \tcode{is_character_file(this->status(ec))}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{is_directory}{directory_entry}% @@ -14291,10 +14486,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_directory(this->status())} or \tcode{is_directory(this->status(ec))}, respectively. +\returns +\tcode{is_directory(this->status())} or \tcode{is_directory(this->status(ec))}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{is_fifo}{directory_entry}% @@ -14305,10 +14502,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_fifo(this->status())} or \tcode{is_fifo(this->status(ec))}, respectively. +\returns +\tcode{is_fifo(this->status())} or \tcode{is_fifo(this->status(ec))}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{is_other}{directory_entry}% @@ -14319,10 +14518,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_other(this->status())} or \tcode{is_other(this->status(ec))}, respectively. +\returns +\tcode{is_other(this->status())} or \tcode{is_other(this->status(ec))}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{is_regular_file}{directory_entry}% @@ -14333,10 +14534,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_regular_file(this->status())} or \tcode{is_regular_file(this->status(ec))}, respective\-ly. +\returns +\tcode{is_regular_file(this->status())} or \tcode{is_regular_file(this->status(ec))}, respective\-ly. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{is_socket}{directory_entry}% @@ -14347,10 +14550,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_socket(this->status())} or \tcode{is_socket(this->status(ec))}, respectively. +\returns +\tcode{is_socket(this->status())} or \tcode{is_socket(this->status(ec))}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{is_symlink}{directory_entry}% @@ -14361,10 +14566,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_symlink(this->symlink_status())} or \tcode{is_symlink(this->symlink_status(ec))}, respectively. +\returns +\tcode{is_symlink(this->symlink_status())} or \tcode{is_symlink(this->symlink_status(ec))}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{file_size}{directory_entry}% @@ -14375,11 +14582,13 @@ \begin{itemdescr} \pnum -\returns If cached, the file size attribute value. +\returns +If cached, the file size attribute value. Otherwise, \tcode{file_size(path())} or \tcode{file_size(path(), ec)}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{hard_link_count}{directory_entry}% @@ -14390,11 +14599,13 @@ \begin{itemdescr} \pnum -\returns If cached, the hard link count attribute value. +\returns +If cached, the hard link count attribute value. Otherwise, \tcode{hard_link_count(path())} or \tcode{hard_link_count(path(), ec)}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{last_write_time}{directory_entry}% @@ -14405,11 +14616,13 @@ \begin{itemdescr} \pnum -\returns If cached, the last write time attribute value. +\returns +If cached, the last write time attribute value. Otherwise, \tcode{last_write_time(path())} or \tcode{last_write_time(path(), ec)}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{status}{directory_entry}% @@ -14420,11 +14633,13 @@ \begin{itemdescr} \pnum -\returns If cached, the status attribute value. +\returns +If cached, the status attribute value. Otherwise, \tcode{status(path())} or \tcode{status(path(), ec)}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{symlink_status}{directory_entry}% @@ -14435,11 +14650,13 @@ \begin{itemdescr} \pnum -\returns If cached, the symlink status attribute value. +\returns +If cached, the symlink status attribute value. Otherwise, \tcode{symlink_status(path())} or \tcode{symlink_status(path(), ec)}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{operator==}{directory_entry}% @@ -14449,7 +14666,8 @@ \begin{itemdescr} \pnum -\returns \tcode{pathobject == rhs.pathobject}. +\returns +\tcode{pathobject == rhs.pathobject}. \end{itemdescr} \indexlibrarymember{operator<=>}{directory_entry}% @@ -14459,7 +14677,8 @@ \begin{itemdescr} \pnum -\returns \tcode{pathobject <=> rhs.pathobject}. +\returns +\tcode{pathobject <=> rhs.pathobject}. \end{itemdescr} \rSec2[fs.class.directory.iterator]{Class \tcode{directory_iterator}} @@ -14578,7 +14797,8 @@ \begin{itemdescr} \pnum -\effects Constructs the end iterator. +\effects +Constructs the end iterator. \end{itemdescr} \indexlibrary{\idxcode{directory_iterator}!constructor}% @@ -14591,7 +14811,8 @@ \begin{itemdescr} \pnum -\effects For the directory that \tcode{p} resolves to, constructs an +\effects +For the directory that \tcode{p} resolves to, constructs an iterator for the first element in a sequence of \tcode{directory_entry} elements representing the files in the directory, if any; otherwise the end iterator. However, if @@ -14603,7 +14824,8 @@ and does not report an error. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} To iterate over the current directory, use \tcode{directory_iterator(".")} rather than \tcode{directory_iterator("")}. \end{note} @@ -14617,10 +14839,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{directory_iterator}. +\effects +Constructs an object of class \tcode{directory_iterator}. \pnum -\ensures \tcode{*this} has the original value of \tcode{rhs}. +\ensures +\tcode{*this} has the original value of \tcode{rhs}. \end{itemdescr} \indexlibrarymember{operator=}{directory_iterator}% @@ -14631,14 +14855,17 @@ \begin{itemdescr} \pnum -\effects If \tcode{*this} and \tcode{rhs} are the same +\effects +If \tcode{*this} and \tcode{rhs} are the same object, the member has no effect. \pnum -\ensures \tcode{*this} has the original value of \tcode{rhs}. +\ensures +\tcode{*this} has the original value of \tcode{rhs}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{increment}{directory_iterator}% @@ -14651,14 +14878,17 @@ \begin{itemdescr} \pnum -\effects As specified for the prefix increment operation of +\effects +As specified for the prefix increment operation of Input iterators\iref{input.iterators}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -14674,7 +14904,8 @@ \begin{itemdescr} \pnum -\returns \tcode{iter}. +\returns +\tcode{iter}. \end{itemdescr} \indexlibrary{\idxcode{end}!\idxcode{directory_iterator}}% @@ -14684,7 +14915,8 @@ \begin{itemdescr} \pnum -\returns \tcode{directory_iterator()}. +\returns +\tcode{directory_iterator()}. \end{itemdescr} \rSec2[fs.class.rec.dir.itr]{Class \tcode{recursive_directory_iterator}} @@ -14766,7 +14998,8 @@ \begin{itemdescr} \pnum -\effects Constructs the end iterator. +\effects +Constructs the end iterator. \end{itemdescr} @@ -14782,7 +15015,8 @@ \begin{itemdescr} \pnum -\effects Constructs an iterator representing the first +\effects +Constructs an iterator representing the first entry in the directory to which \tcode{p} resolves, if any; otherwise, the end iterator. However, if \begin{codeblock} @@ -14793,11 +15027,13 @@ and does not report an error. \pnum -\ensures \tcode{options() == options} for the signatures with a +\ensures +\tcode{options() == options} for the signatures with a \tcode{directory_options} argument, otherwise \tcode{options() == directory_options::none}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} To iterate over the current directory, use \tcode{recursive_directory_iterator(".")} @@ -14816,7 +15052,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{recursive_directory_iterator}. +\effects +Constructs an object of class \tcode{recursive_directory_iterator}. \pnum \ensures @@ -14834,10 +15071,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{recursive_directory_iterator}. +\effects +Constructs an object of class \tcode{recursive_directory_iterator}. \pnum -\ensures \tcode{options()}, \tcode{depth()}, +\ensures +\tcode{options()}, \tcode{depth()}, and \tcode{recursion_pending()} have the values that \tcode{rhs.options()}, \tcode{rhs.depth()}, and \tcode{rhs.recursion_pending()}, respectively, had before the function call. @@ -14850,7 +15089,8 @@ \begin{itemdescr} \pnum -\effects If \tcode{*this} and \tcode{rhs} are the same +\effects +If \tcode{*this} and \tcode{rhs} are the same object, the member has no effect. \pnum @@ -14862,7 +15102,8 @@ \end{itemize} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{recursive_directory_iterator}% @@ -14872,16 +15113,19 @@ \begin{itemdescr} \pnum -\effects If \tcode{*this} and \tcode{rhs} are the same +\effects +If \tcode{*this} and \tcode{rhs} are the same object, the member has no effect. \pnum -\ensures \tcode{options()}, \tcode{depth()}, +\ensures +\tcode{options()}, \tcode{depth()}, and \tcode{recursion_pending()} have the values that \tcode{rhs.options()}, \tcode{rhs.depth()}, and \tcode{rhs.recursion_pending()}, respectively, had before the function call. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{options}{recursive_directory_iterator}% @@ -14891,12 +15135,14 @@ \begin{itemdescr} \pnum -\returns The value of the argument passed to the constructor for the +\returns +The value of the argument passed to the constructor for the \tcode{options} parameter, if present, otherwise \tcode{directory_options::none}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{depth}{recursive_directory_iterator}% @@ -14906,12 +15152,14 @@ \begin{itemdescr} \pnum -\returns The current depth of the directory tree being traversed. \begin{note} +\returns +The current depth of the directory tree being traversed. \begin{note} The initial directory is depth \tcode{0}, its immediate subdirectories are depth \tcode{1}, and so forth. \end{note} \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{recursion_pending}{recursive_directory_iterator}% @@ -14921,12 +15169,14 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if \tcode{disable_recursion_pending()} +\returns +\tcode{true} if \tcode{disable_recursion_pending()} has not been called subsequent to the prior construction or increment operation, otherwise \tcode{false}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{increment}{recursive_directory_iterator}% @@ -14938,7 +15188,8 @@ \begin{itemdescr} \pnum -\effects As specified for the prefix increment operation of +\effects +As specified for the prefix increment operation of Input iterators\iref{input.iterators}, except that: @@ -14963,10 +15214,12 @@ \end{itemize} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrarymember{pop}{recursive_directory_iterator}% @@ -14977,16 +15230,19 @@ \begin{itemdescr} \pnum -\effects If \tcode{depth() == 0}, set \tcode{*this} to \tcode{recursive_directory_iterator()}. +\effects +If \tcode{depth() == 0}, set \tcode{*this} to \tcode{recursive_directory_iterator()}. Otherwise, cease iteration of the directory currently being iterated over, and continue iteration over the parent directory. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \pnum -\remarks Any copies of the previous value of \tcode{*this} +\remarks +Any copies of the previous value of \tcode{*this} are no longer required to be dereferenceable nor to be in the domain of \tcode{==}. @@ -14997,7 +15253,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{recursion_pending() == false}. +\ensures +\tcode{recursion_pending() == false}. \pnum \begin{note} \tcode{disable_recursion_pending}\tcode{()} is used to prevent @@ -15017,7 +15274,8 @@ \begin{itemdescr} \pnum -\returns \tcode{iter}. +\returns +\tcode{iter}. \end{itemdescr} \indexlibrary{\idxcode{end}!\idxcode{recursive_directory_iterator}}% @@ -15027,7 +15285,8 @@ \begin{itemdescr} \pnum -\returns \tcode{recursive_directory_iterator()}. +\returns +\tcode{recursive_directory_iterator()}. \end{itemdescr} \rSec2[fs.op.funcs]{Filesystem operation functions} @@ -15052,11 +15311,13 @@ \begin{itemdescr} \pnum -\effects Composes an absolute path referencing the same file system location +\effects +Composes an absolute path referencing the same file system location as \tcode{p} according to the operating system\iref{fs.conform.os}. \pnum -\returns The composed path. +\returns +The composed path. The signature with argument \tcode{ec} returns \tcode{path()} if an error occurs. \pnum @@ -15066,7 +15327,8 @@ \end{note} \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} @@ -15100,20 +15362,24 @@ \begin{itemdescr} \pnum -\effects Converts \tcode{p} to an absolute +\effects +Converts \tcode{p} to an absolute path that has no symbolic link, dot, or dot-dot elements in its pathname in the generic format. \pnum -\returns A path that refers to +\returns +A path that refers to the same file system object as \tcode{absolute(p)}. The signature with argument \tcode{ec} returns \tcode{path()} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum -\remarks \tcode{!exists(p)} is an error. +\remarks +\tcode{!exists(p)} is an error. \end{itemdescr} \rSec3[fs.op.copy]{Copy} @@ -15125,7 +15391,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to +\effects +Equivalent to \tcode{copy(from, to, copy_options::none)}. \end{itemdescr} @@ -15136,7 +15403,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to +\effects +Equivalent to \tcode{copy(from, to, copy_options::none, ec)}. \end{itemdescr} @@ -15250,10 +15518,12 @@ \end{itemize} \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum -\remarks For the signature with argument \tcode{ec}, any +\remarks +For the signature with argument \tcode{ec}, any library functions called by the implementation shall have an \tcode{error_code} argument if applicable. \pnum @@ -15306,11 +15576,13 @@ \begin{itemdescr} \pnum -\returns \tcode{copy_file(from, to, copy_options::none)} or\\ +\returns +\tcode{copy_file(from, to, copy_options::none)} or\\ \tcode{copy_file(from, to, copy_options::none, ec)}, respectively. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15360,15 +15632,18 @@ \end{itemize} \pnum -\returns \tcode{true} if the \tcode{from} file +\returns +\tcode{true} if the \tcode{from} file was copied, otherwise \tcode{false}. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum -\complexity At most one direct or indirect invocation of \tcode{status(to)}. +\complexity +At most one direct or indirect invocation of \tcode{status(to)}. \end{itemdescr} \rSec3[fs.op.copy.symlink]{Copy symlink} @@ -15382,14 +15657,16 @@ \begin{itemdescr} \pnum -\effects Equivalent to +\effects +Equivalent to \tcode{\textit{function}(read_symlink(existing_symlink), new_symlink)} or\\ \tcode{\textit{function}(read_symlink(existing_symlink, ec), new_symlink, ec)}, respectively, where in each case \tcode{\textit{function}} is \tcode{create_symlink} or \tcode{create_directory_symlink} as appropriate. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15403,19 +15680,23 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{create_directory()} for each element of \tcode{p} +\effects +Calls \tcode{create_directory()} for each element of \tcode{p} that does not exist. \pnum -\returns \tcode{true} if a new directory was created +\returns +\tcode{true} if a new directory was created for the directory \tcode{p} resolves to, otherwise \tcode{false}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum -\complexity \bigoh{n} where \textit{n} is the number of elements +\complexity +\bigoh{n} where \textit{n} is the number of elements of \tcode{p}. \end{itemdescr} @@ -15430,17 +15711,20 @@ \begin{itemdescr} \pnum -\effects Creates the directory \tcode{p} resolves to, +\effects +Creates the directory \tcode{p} resolves to, as if by POSIX \tcode{mkdir} with a second argument of \tcode{static_cast(perms::all)}. If \tcode{mkdir} fails because \tcode{p} resolves to an existing directory, no error is reported. Otherwise on failure an error is reported. \pnum -\returns \tcode{true} if a new directory was created, otherwise \tcode{false}. +\returns +\tcode{true} if a new directory was created, otherwise \tcode{false}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrary{\idxcode{create_directory}}% @@ -15451,7 +15735,8 @@ \begin{itemdescr} \pnum -\effects Creates the +\effects +Creates the directory \tcode{p} resolves to, with attributes copied from directory \tcode{existing_p}. The set of attributes copied is operating system dependent. @@ -15465,12 +15750,14 @@ \end{note} \pnum -\returns \tcode{true} if a new directory was created +\returns +\tcode{true} if a new directory was created with attributes copied from directory \tcode{existing_p}, otherwise \tcode{false}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15485,14 +15772,17 @@ \begin{itemdescr} \pnum -\effects Establishes the postcondition, as if by POSIX \tcode{symlink()}. +\effects +Establishes the postcondition, as if by POSIX \tcode{symlink()}. \pnum -\ensures \tcode{new_symlink} resolves to a symbolic link file that +\ensures +\tcode{new_symlink} resolves to a symbolic link file that contains an unspecified representation of \tcode{to}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} Some operating systems require symlink creation to @@ -15517,7 +15807,8 @@ \begin{itemdescr} \pnum -\effects Establishes the postcondition, as if by POSIX \tcode{link()}. +\effects +Establishes the postcondition, as if by POSIX \tcode{link()}. \pnum \ensures @@ -15528,7 +15819,8 @@ \end{itemize} \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} Some operating systems do not support hard links at all or support @@ -15548,14 +15840,17 @@ \begin{itemdescr} \pnum -\effects Establishes the postcondition, as if by POSIX \tcode{symlink()}. +\effects +Establishes the postcondition, as if by POSIX \tcode{symlink()}. \pnum -\ensures \tcode{new_symlink} resolves to a symbolic link file that +\ensures +\tcode{new_symlink} resolves to a symbolic link file that contains an unspecified representation of \tcode{to}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} Some operating systems do not support symbolic links at all or support @@ -15574,17 +15869,20 @@ \begin{itemdescr} \pnum -\returns The absolute path of the current working directory, +\returns +The absolute path of the current working directory, whose pathname in the native format is obtained as if by POSIX \tcode{getcwd()}. The signature with argument \tcode{ec} returns \tcode{path()} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum -\remarks The current working directory is the directory, associated +\remarks +The current working directory is the directory, associated with the process, that is used as the starting location in pathname resolution for relative paths. @@ -15606,13 +15904,16 @@ \begin{itemdescr} \pnum -\effects Establishes the postcondition, as if by POSIX \tcode{chdir()}. +\effects +Establishes the postcondition, as if by POSIX \tcode{chdir()}. \pnum -\ensures \tcode{equivalent(p, current_path())}. +\ensures +\tcode{equivalent(p, current_path())}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} The current path for many operating systems is a dangerous @@ -15630,7 +15931,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true}, if \tcode{p1} and \tcode{p2} resolve to the same file +\returns +\tcode{true}, if \tcode{p1} and \tcode{p2} resolve to the same file system entity, otherwise \tcode{false}. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. @@ -15645,10 +15947,12 @@ \end{note} \pnum -\remarks \tcode{!exists(p1) || !exists(p2)} is an error. +\remarks +\tcode{!exists(p1) || !exists(p2)} is an error. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15661,7 +15965,8 @@ \begin{itemdescr} \pnum -\returns \tcode{status_known(s) \&\& s.type() != file_type::not_found}. +\returns +\tcode{status_known(s) \&\& s.type() != file_type::not_found}. \end{itemdescr} \indexlibrary{\idxcode{exists}}% @@ -15676,14 +15981,17 @@ determined as if by \tcode{status(p)} or \tcode{status(p, ec)}, respectively. \pnum -\effects The signature with argument \tcode{ec} calls \tcode{ec.clear()} +\effects +The signature with argument \tcode{ec} calls \tcode{ec.clear()} if \tcode{status_known(s)}. \pnum -\returns \tcode{exists(s)}. +\returns +\tcode{exists(s)}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15714,7 +16022,8 @@ if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15728,12 +16037,14 @@ \begin{itemdescr} \pnum -\returns The number of hard links for \tcode{p}. The signature +\returns +The number of hard links for \tcode{p}. The signature with argument \tcode{ec} returns \tcode{static_cast(-1)} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15746,7 +16057,8 @@ \begin{itemdescr} \pnum -\returns \tcode{s.type() == file_type::block}. +\returns +\tcode{s.type() == file_type::block}. \end{itemdescr} \indexlibrary{\idxcode{is_block_file}}% @@ -15757,11 +16069,13 @@ \begin{itemdescr} \pnum -\returns \tcode{is_block_file(status(p))} or \tcode{is_block_file(status(p, ec))}, respectively. +\returns +\tcode{is_block_file(status(p))} or \tcode{is_block_file(status(p, ec))}, respectively. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15774,7 +16088,8 @@ \begin{itemdescr} \pnum -\returns \tcode{s.type() == file_type::character}. +\returns +\tcode{s.type() == file_type::character}. \end{itemdescr} \indexlibrary{\idxcode{is_character_file}}% @@ -15785,13 +16100,15 @@ \begin{itemdescr} \pnum -\returns \tcode{is_character_file(status(p))} +\returns +\tcode{is_character_file(status(p))} or \tcode{is_character_file(status(p, ec))}, respectively.\\The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15804,7 +16121,8 @@ \begin{itemdescr} \pnum -\returns \tcode{s.type() == file_type::directory}. +\returns +\tcode{s.type() == file_type::directory}. \end{itemdescr} \indexlibrary{\idxcode{is_directory}}% @@ -15815,12 +16133,14 @@ \begin{itemdescr} \pnum -\returns \tcode{is_directory(status(p))} or \tcode{is_directory(status(p, ec))}, +\returns +\tcode{is_directory(status(p))} or \tcode{is_directory(status(p, ec))}, respectively. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15861,7 +16181,8 @@ \end{itemize} \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15874,7 +16195,8 @@ \begin{itemdescr} \pnum -\returns \tcode{s.type() == file_type::fifo}. +\returns +\tcode{s.type() == file_type::fifo}. \end{itemdescr} @@ -15886,11 +16208,13 @@ \begin{itemdescr} \pnum -\returns \tcode{is_fifo(status(p))} or \tcode{is_fifo(status(p, ec))}, respectively. +\returns +\tcode{is_fifo(status(p))} or \tcode{is_fifo(status(p, ec))}, respectively. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15903,7 +16227,8 @@ \begin{itemdescr} \pnum -\returns \tcode{exists(s) \&\& !is_regular_file(s) \&\& !is_directory(s) \&\& !is_symlink(s)}. +\returns +\tcode{exists(s) \&\& !is_regular_file(s) \&\& !is_directory(s) \&\& !is_symlink(s)}. \end{itemdescr} \indexlibrary{\idxcode{is_other}}% @@ -15914,12 +16239,14 @@ \begin{itemdescr} \pnum -\returns \tcode{is_other(status(p))} or \tcode{is_other(status(p, ec))}, +\returns +\tcode{is_other(status(p))} or \tcode{is_other(status(p, ec))}, respectively. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -15932,7 +16259,8 @@ \begin{itemdescr} \pnum -\returns \tcode{s.type() == file_type::regular}. +\returns +\tcode{s.type() == file_type::regular}. \end{itemdescr} \indexlibrary{\idxcode{is_regular_file}}% @@ -15942,10 +16270,12 @@ \begin{itemdescr} \pnum -\returns \tcode{is_regular_file(status(p))}. +\returns +\tcode{is_regular_file(status(p))}. \pnum -\throws \tcode{filesystem_error} if \tcode{status(p)} would throw \tcode{filesystem_error}. +\throws +\tcode{filesystem_error} if \tcode{status(p)} would throw \tcode{filesystem_error}. \end{itemdescr} \indexlibrary{\idxcode{is_regular_file}}% @@ -15955,12 +16285,14 @@ \begin{itemdescr} \pnum -\effects Sets \tcode{ec} as if by \tcode{status(p, ec)}. \begin{note} +\effects +Sets \tcode{ec} as if by \tcode{status(p, ec)}. \begin{note} \tcode{file_type::none}, \tcode{file_type::not_found} and \tcode{file_type::unknown} cases set \tcode{ec} to error values. To distinguish between cases, call the \tcode{status} function directly. \end{note} \pnum -\returns \tcode{is_regular_file(status(p, ec))}. +\returns +\tcode{is_regular_file(status(p, ec))}. Returns \tcode{false} if an error occurs. \end{itemdescr} @@ -15974,7 +16306,8 @@ \begin{itemdescr} \pnum -\returns \tcode{s.type() == file_type::socket}. +\returns +\tcode{s.type() == file_type::socket}. \end{itemdescr} \indexlibrary{\idxcode{is_socket}}% @@ -15985,12 +16318,14 @@ \begin{itemdescr} \pnum -\returns \tcode{is_socket(status(p))} or +\returns +\tcode{is_socket(status(p))} or \tcode{is_socket(status(p, ec))}, respectively. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -16003,7 +16338,8 @@ \begin{itemdescr} \pnum -\returns \tcode{s.type() == file_type::symlink}. +\returns +\tcode{s.type() == file_type::symlink}. \end{itemdescr} \indexlibrary{\idxcode{is_symlink}}% @@ -16014,12 +16350,14 @@ \begin{itemdescr} \pnum -\returns \tcode{is_symlink(symlink_status(p))} or \tcode{is_symlink(symlink_status(p, ec))}, +\returns +\tcode{is_symlink(symlink_status(p))} or \tcode{is_symlink(symlink_status(p, ec))}, respectively. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -16033,14 +16371,16 @@ \begin{itemdescr} \pnum -\returns The time of last data modification of \tcode{p}, +\returns +The time of last data modification of \tcode{p}, determined as if by the value of the POSIX \tcode{stat} class member \tcode{st_mtime} obtained as if by POSIX \tcode{stat()}. The signature with argument \tcode{ec} returns \tcode{file_time_type::min()} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrary{\idxcode{last_write_time}}% @@ -16052,11 +16392,13 @@ \begin{itemdescr} \pnum -\effects Sets the time of last data modification of the file +\effects +Sets the time of last data modification of the file resolved to by \tcode{p} to \tcode{new_time}, as if by POSIX \tcode{futimens()}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{note} A postcondition of \tcode{last_write_time(p) == new_time} is not specified since it might not hold for file systems @@ -16093,7 +16435,8 @@ implementation may use some other mechanism. \end{note} \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \rSec3[fs.op.proximate]{Proximate} @@ -16105,10 +16448,12 @@ \begin{itemdescr} \pnum -\returns \tcode{proximate(p, current_path(), ec)}. +\returns +\tcode{proximate(p, current_path(), ec)}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrary{\idxcode{proximate}}% @@ -16119,7 +16464,8 @@ \begin{itemdescr} \pnum -\returns For the first form: +\returns +For the first form: \begin{codeblock} weakly_canonical(p).lexically_proximate(weakly_canonical(base)); \end{codeblock} @@ -16130,7 +16476,8 @@ or \tcode{path()} at the first error occurrence, if any. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \rSec3[fs.op.read.symlink]{Read symlink} @@ -16143,13 +16490,15 @@ \begin{itemdescr} \pnum -\returns If \tcode{p} resolves to a symbolic +\returns +If \tcode{p} resolves to a symbolic link, a \tcode{path} object containing the contents of that symbolic link. The signature with argument \tcode{ec} returns \tcode{path()} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. \begin{note} It is an error if \tcode{p} does not +\throws +As specified in~\ref{fs.err.report}. \begin{note} It is an error if \tcode{p} does not resolve to a symbolic link. \end{note} \end{itemdescr} @@ -16162,10 +16511,12 @@ \begin{itemdescr} \pnum -\returns \tcode{relative(p, current_path(), ec)}. +\returns +\tcode{relative(p, current_path(), ec)}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \indexlibrary{\idxcode{relative}}% @@ -16176,7 +16527,8 @@ \begin{itemdescr} \pnum -\returns For the first form: +\returns +For the first form: \begin{codeblock} weakly_canonical(p).lexically_relative(weakly_canonical(base)); \end{codeblock} @@ -16187,7 +16539,8 @@ or \tcode{path()} at the first error occurrence, if any. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \rSec3[fs.op.remove]{Remove} @@ -16200,21 +16553,25 @@ \begin{itemdescr} \pnum -\effects If \tcode{exists(symlink_status(p, ec))}, the file \tcode{p} is +\effects +If \tcode{exists(symlink_status(p, ec))}, the file \tcode{p} is removed as if by POSIX \tcode{remove()}. \begin{note} A symbolic link is itself removed, rather than the file it resolves to. \end{note} \pnum -\ensures \tcode{exists(symlink_status(p))} is \tcode{false}. +\ensures +\tcode{exists(symlink_status(p))} is \tcode{false}. \pnum -\returns \tcode{false} if \tcode{p} did not exist, +\returns +\tcode{false} if \tcode{p} did not exist, otherwise \tcode{true}. The signature with argument \tcode{ec} returns \tcode{false} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -16228,21 +16585,25 @@ \begin{itemdescr} \pnum -\effects Recursively deletes the contents of \tcode{p} if it exists, +\effects +Recursively deletes the contents of \tcode{p} if it exists, then deletes file \tcode{p} itself, as if by POSIX \tcode{remove()}. \begin{note} A symbolic link is itself removed, rather than the file it resolves to. \end{note} \pnum -\ensures \tcode{exists(symlink_status(p))} is \tcode{false}. +\ensures +\tcode{exists(symlink_status(p))} is \tcode{false}. \pnum -\returns The number of files removed. The signature with argument +\returns +The number of files removed. The signature with argument \tcode{ec} returns \tcode{static_cast< uintmax_t>(-1)} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -16256,7 +16617,8 @@ \begin{itemdescr} \pnum -\effects Renames \tcode{old_p} to \tcode{new_p}, as if by +\effects +Renames \tcode{old_p} to \tcode{new_p}, as if by POSIX \tcode{rename()}. \begin{note} @@ -16276,7 +16638,8 @@ \end{note} \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -16290,11 +16653,13 @@ \begin{itemdescr} \pnum -\effects Causes the size that would be returned by \tcode{file_size(p)} to be +\effects +Causes the size that would be returned by \tcode{file_size(p)} to be equal to \tcode{new_size}, as if by POSIX \tcode{truncate()}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -16308,7 +16673,8 @@ \begin{itemdescr} \pnum -\returns An object of type \tcode{space_info}. The value of the \tcode{space_info} +\returns +An object of type \tcode{space_info}. The value of the \tcode{space_info} object is determined as if by using POSIX \tcode{statvfs} to obtain a POSIX \tcode{struct statvfs}, and then multiplying its \tcode{f_blocks}, \tcode{f_bfree}, @@ -16320,10 +16686,12 @@ \tcode{static_cast(-1)} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum -\remarks The value of member \tcode{space_info::available} +\remarks +The value of member \tcode{space_info::available} is operating system dependent. \begin{note} \tcode{available} may be less than \tcode{free}. \end{note} \end{itemdescr} @@ -16338,7 +16706,8 @@ \begin{itemdescr} \pnum -\effects As if: +\effects +As if: \begin{codeblock} error_code ec; file_status result = status(p, ec); @@ -16348,10 +16717,12 @@ \end{codeblock} \pnum -\returns See above. +\returns +See above. \pnum -\throws \tcode{filesystem_error}. +\throws +\tcode{filesystem_error}. \begin{note} \tcode{result} values of \tcode{file_status(file_type::not_found)} and \tcode{file_status(file_type::unknown)} are not considered failures and do not cause an exception to be thrown.\end{note} @@ -16428,7 +16799,8 @@ \end{itemize} \pnum -\remarks If a symbolic link is encountered during pathname resolution, +\remarks +If a symbolic link is encountered during pathname resolution, pathname resolution continues using the contents of the symbolic link. \end{itemdescr} @@ -16442,7 +16814,8 @@ \begin{itemdescr} \pnum -\returns \tcode{s.type() != file_type::none}. +\returns +\tcode{s.type() != file_type::none}. \end{itemdescr} @@ -16456,7 +16829,8 @@ \begin{itemdescr} \pnum -\effects Same as \tcode{status()}, above, +\effects +Same as \tcode{status()}, above, except that the attributes of \tcode{p} are determined as if by using POSIX \tcode{lstat()} to obtain a POSIX \tcode{struct stat}. @@ -16467,17 +16841,20 @@ of the obtained \tcode{struct stat} to the type \tcode{perms}. \pnum -\returns Same as \tcode{status()}, above, except +\returns +Same as \tcode{status()}, above, except that if the attributes indicate a symbolic link, as if by POSIX \tcode{S_ISLNK}, returns \tcode{file_status(file_type::symlink, prms)}. The signature with argument \tcode{ec} returns \tcode{file_status(file_type::none)} if an error occurs. \pnum -\remarks Pathname resolution terminates if \tcode{p} names a symbolic link. +\remarks +Pathname resolution terminates if \tcode{p} names a symbolic link. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} @@ -16494,16 +16871,19 @@ Let \tcode{p} be an unspecified directory path suitable for temporary files. \pnum -\effects If \tcode{exists(p)} is \tcode{false} or \tcode{is_directory(p)} is +\effects +If \tcode{exists(p)} is \tcode{false} or \tcode{is_directory(p)} is \tcode{false}, an error is reported\iref{fs.err.report}. \pnum -\returns The path \tcode{p}. +\returns +The path \tcode{p}. The signature with argument \tcode{ec} returns \tcode{path()} if an error occurs. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \pnum \begin{example} For POSIX-based operating systems, an implementation might @@ -16526,11 +16906,13 @@ \begin{itemdescr} \pnum -\returns \tcode{p} with symlinks resolved and +\returns +\tcode{p} with symlinks resolved and the result normalized\iref{fs.path.generic}. \pnum -\effects Using \tcode{status(p)} or \tcode{status(p, ec)}, respectively, +\effects +Using \tcode{status(p)} or \tcode{status(p, ec)}, respectively, to determine existence, return a path composed by \tcode{operator/=} from the result of calling \tcode{canonical()} @@ -16545,15 +16927,18 @@ \tcode{path()} is returned at the first error occurrence, if any. \pnum -\ensures The returned path is in normal form\iref{fs.path.generic}. +\ensures +The returned path is in normal form\iref{fs.path.generic}. \pnum -\remarks Implementations should +\remarks +Implementations should avoid unnecessary normalization such as when \tcode{canonical} has already been called on the entirety of \tcode{p}. \pnum -\throws As specified in~\ref{fs.err.report}. +\throws +As specified in~\ref{fs.err.report}. \end{itemdescr} \rSec1[c.files]{C library files} diff --git a/source/iterators.tex b/source/iterators.tex index 99df52078e..14f6c51454 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1097,7 +1097,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} iter_value_t> old_value(iter_move(x)); *x = iter_move(y); @@ -2779,7 +2780,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{advance(x, n); return x;} +\effects +Equivalent to: \tcode{advance(x, n); return x;} \end{itemdescr} \indexlibrary{\idxcode{prev}}% @@ -2791,7 +2793,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{advance(x, -n); return x;} +\effects +Equivalent to: \tcode{advance(x, -n); return x;} \end{itemdescr} \rSec2[range.iter.ops]{Range iterator operations} @@ -2982,7 +2985,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{++x; return x;} +\effects +Equivalent to: \tcode{++x; return x;} \end{itemdescr} \indexlibrary{\idxcode{next}}% @@ -2993,7 +2997,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{ranges::advance(x, n); return x;} +\effects +Equivalent to: \tcode{ranges::advance(x, n); return x;} \end{itemdescr} \indexlibrary{\idxcode{next}}% @@ -3004,7 +3009,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{ranges::advance(x, bound); return x;} +\effects +Equivalent to: \tcode{ranges::advance(x, bound); return x;} \end{itemdescr} \indexlibrary{\idxcode{next}}% @@ -3015,7 +3021,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{ranges::advance(x, n, bound); return x;} +\effects +Equivalent to: \tcode{ranges::advance(x, n, bound); return x;} \end{itemdescr} \rSec3[range.iter.op.prev]{\tcode{ranges::prev}} @@ -3027,7 +3034,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{-{-}x; return x;} +\effects +Equivalent to: \tcode{-{-}x; return x;} \end{itemdescr} \indexlibrary{\idxcode{prev}}% @@ -3038,7 +3046,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{ranges::advance(x, -n); return x;} +\effects +Equivalent to: \tcode{ranges::advance(x, -n); return x;} \end{itemdescr} \indexlibrary{\idxcode{prev}}% @@ -3049,7 +3058,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{ranges::advance(x, -n, bound); return x;} +\effects +Equivalent to: \tcode{ranges::advance(x, -n, bound); return x;} \end{itemdescr} \rSec1[predef.iterators]{Iterator adaptors} @@ -3582,14 +3592,16 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = i.base(); return ranges::iter_move(--tmp); \end{codeblock} \pnum -\remarks The expression in \tcode{noexcept} is equivalent to: +\remarks +The expression in \tcode{noexcept} is equivalent to: \begin{codeblock} is_nothrow_copy_constructible_v && noexcept(ranges::iter_move(--declval())) @@ -3606,7 +3618,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto xtmp = x.base(); auto ytmp = y.base(); @@ -3614,7 +3627,8 @@ \end{codeblock} \pnum -\remarks The expression in \tcode{noexcept} is equivalent to: +\remarks +The expression in \tcode{noexcept} is equivalent to: \begin{codeblock} is_nothrow_copy_constructible_v && is_nothrow_copy_constructible_v && @@ -4151,7 +4165,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{move_iterator}, value-initializing +\effects +Constructs a \tcode{move_iterator}, value-initializing \tcode{current}. Iterator operations applied to the resulting iterator have defined behavior if and only if the corresponding operations are defined on a value-initialized iterator of type \tcode{Iterator}. @@ -4165,7 +4180,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{move_iterator}, initializing +\effects +Constructs a \tcode{move_iterator}, initializing \tcode{current} with \tcode{std::move(i)}. \end{itemdescr} @@ -4177,10 +4193,12 @@ \begin{itemdescr} \pnum -\mandates \tcode{U} is convertible to \tcode{Iterator}. +\mandates +\tcode{U} is convertible to \tcode{Iterator}. \pnum -\effects Constructs a \tcode{move_iterator}, initializing +\effects +Constructs a \tcode{move_iterator}, initializing \tcode{current} with \tcode{u.base()}. \end{itemdescr} @@ -4191,10 +4209,12 @@ \begin{itemdescr} \pnum -\mandates \tcode{U} is convertible to \tcode{Iterator}. +\mandates +\tcode{U} is convertible to \tcode{Iterator}. \pnum -\effects Assigns \tcode{u.base()} to +\effects +Assigns \tcode{u.base()} to \tcode{current}. \end{itemdescr} @@ -4210,10 +4230,12 @@ \constraints \tcode{Iterator} satisfies \libconcept{copy_constructible}. \pnum -\expects \tcode{Iterator} models \libconcept{copy_constructible}. +\expects +\tcode{Iterator} models \libconcept{copy_constructible}. \pnum -\returns \tcode{current}. +\returns +\tcode{current}. \end{itemdescr} \indexlibrarymember{base}{move_iterator}% @@ -4223,7 +4245,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::move(current)}. +\returns +\tcode{std::move(current)}. \end{itemdescr} \rSec3[move.iter.elem]{Element access} @@ -4235,7 +4258,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return ranges::iter_move(current);} +\effects +Equivalent to: \tcode{return ranges::iter_move(current);} \end{itemdescr} \indexlibrarymember{operator[]}{move_iterator}% @@ -4245,7 +4269,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{ranges::iter_move(current + n);} +\effects +Equivalent to: \tcode{ranges::iter_move(current + n);} \end{itemdescr} \rSec3[move.iter.nav]{Navigation} @@ -4257,10 +4282,12 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{++current}. +\effects +As if by \tcode{++current}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator++}{move_iterator}% @@ -4287,10 +4314,12 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{\dcr current}. +\effects +As if by \tcode{\dcr current}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator\dcr}{move_iterator}% @@ -4316,7 +4345,8 @@ \begin{itemdescr} \pnum -\returns \tcode{move_iterator(current + n)}. +\returns +\tcode{move_iterator(current + n)}. \end{itemdescr} \indexlibrarymember{operator+=}{move_iterator}% @@ -4326,10 +4356,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{current += n;} +\effects +As if by: \tcode{current += n;} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-}{move_iterator}% @@ -4339,7 +4371,8 @@ \begin{itemdescr} \pnum -\returns \tcode{move_iterator(current - n)}. +\returns +\tcode{move_iterator(current - n)}. \end{itemdescr} \indexlibrarymember{operator-=}{move_iterator}% @@ -4349,10 +4382,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{current -= n;} +\effects +As if by: \tcode{current -= n;} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec3[move.iter.op.comp]{Comparisons} @@ -4374,7 +4409,8 @@ convertible to \tcode{bool}. \pnum -\returns \tcode{x.base() == y.base()}. +\returns +\tcode{x.base() == y.base()}. \end{itemdescr} \indexlibrarymember{operator<}{move_iterator}% @@ -4390,7 +4426,8 @@ convertible to \tcode{bool}. \pnum -\returns \tcode{x.base() < y.base()}. +\returns +\tcode{x.base() < y.base()}. \end{itemdescr} \indexlibrarymember{operator>}{move_iterator}% @@ -4406,7 +4443,8 @@ convertible to \tcode{bool}. \pnum -\returns \tcode{y < x}. +\returns +\tcode{y < x}. \end{itemdescr} \indexlibrarymember{operator<=}{move_iterator}% @@ -4422,7 +4460,8 @@ convertible to \tcode{bool}. \pnum -\returns \tcode{!(y < x)}. +\returns +\tcode{!(y < x)}. \end{itemdescr} \indexlibrarymember{operator>=}{move_iterator}% @@ -4438,7 +4477,8 @@ convertible to \tcode{bool}. \pnum -\returns \tcode{!(x < y)}. +\returns +\tcode{!(x < y)}. \end{itemdescr} \indexlibrarymember{operator<=>}{move_iterator}% @@ -4473,7 +4513,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.base() - y.base()}. +\returns +\tcode{x.base() - y.base()}. \end{itemdescr} \indexlibrarymember{operator+}{move_iterator}% @@ -4489,7 +4530,8 @@ \tcode{x + n} is well-formed and has type \tcode{Iterator}. \pnum -\returns \tcode{x + n}. +\returns +\tcode{x + n}. \end{itemdescr} \indexlibrarymember{iter_move}{move_iterator}% @@ -4501,7 +4543,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return ranges::iter_move(i.current);} +\effects +Equivalent to: \tcode{return ranges::iter_move(i.current);} \end{itemdescr} \indexlibrarymember{iter_swap}{move_iterator}% @@ -4514,7 +4557,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{ranges::iter_swap(x.current, y.current)}. +\effects +Equivalent to: \tcode{ranges::iter_swap(x.current, y.current)}. \end{itemdescr} \indexlibrary{\idxcode{make_move_iterator}}% @@ -4525,7 +4569,8 @@ \begin{itemdescr} \pnum -\returns \tcode{move_iterator(i)}. +\returns +\tcode{move_iterator(i)}. \end{itemdescr} \rSec3[move.sentinel]{Class template \tcode{move_sentinel}} @@ -4583,7 +4628,8 @@ \begin{itemdescr} \pnum -\effects Value-initializes \tcode{last}. +\effects +Value-initializes \tcode{last}. If \tcode{is_trivially_default_constructible_v} is \tcode{true}, then this constructor is a \tcode{constexpr} constructor. \end{itemdescr} @@ -4595,7 +4641,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{last} with \tcode{std::move(s)}. +\effects +Initializes \tcode{last} with \tcode{std::move(s)}. \end{itemdescr} \indexlibrary{\idxcode{move_sentinel}!constructor}% @@ -4607,7 +4654,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{last} with \tcode{s.last}. +\effects +Initializes \tcode{last} with \tcode{s.last}. \end{itemdescr} \indexlibrary{\idxcode{operator=}!\idxcode{move_sentinel}}% @@ -4620,7 +4668,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{last = s.last; return *this;} +\effects +Equivalent to: \tcode{last = s.last; return *this;} \end{itemdescr} \rSec2[iterators.common]{Common iterators} @@ -4769,7 +4818,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{v_} as if by +\effects +Initializes \tcode{v_} as if by \tcode{v_\{in_place_type, std::move(s)\}}. \end{itemdescr} @@ -4782,7 +4832,8 @@ \begin{itemdescr} \pnum -\expects \tcode{x.v_.valueless_by_exception()} is \tcode{false}. +\expects +\tcode{x.v_.valueless_by_exception()} is \tcode{false}. \pnum \effects @@ -4801,7 +4852,8 @@ \begin{itemdescr} \pnum -\expects \tcode{x.v_.valueless_by_exception()} is \tcode{false}. +\expects +\tcode{x.v_.valueless_by_exception()} is \tcode{false}. \pnum \effects @@ -4815,7 +4867,8 @@ where $i$ is \tcode{x.v_.index()}. \pnum -\returns \tcode{*this} +\returns +\tcode{*this} \end{itemdescr} \rSec3[common.iter.access]{Accessors} @@ -4829,10 +4882,12 @@ \begin{itemdescr} \pnum -\expects \tcode{holds_alternative(v_)}. +\expects +\tcode{holds_alternative(v_)}. \pnum -\effects Equivalent to: \tcode{return *get(v_);} +\effects +Equivalent to: \tcode{return *get(v_);} \end{itemdescr} \indexlibrarymember{operator->}{common_iterator}% @@ -4852,7 +4907,8 @@ \end{codeblock} \pnum -\expects \tcode{holds_alternative(v_)}. +\expects +\tcode{holds_alternative(v_)}. \pnum \effects @@ -4896,13 +4952,16 @@ \begin{itemdescr} \pnum -\expects \tcode{holds_alternative(v_)}. +\expects +\tcode{holds_alternative(v_)}. \pnum -\effects Equivalent to \tcode{++get(v_)}. +\effects +Equivalent to \tcode{++get(v_)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator++}{common_iterator}% @@ -4912,7 +4971,8 @@ \begin{itemdescr} \pnum -\expects \tcode{holds_alternative(v_)}. +\expects +\tcode{holds_alternative(v_)}. \pnum \effects @@ -5001,10 +5061,12 @@ \begin{itemdescr} \pnum -\expects \tcode{holds_alternative(v_)}. +\expects +\tcode{holds_alternative(v_)}. \pnum -\effects Equivalent to: \tcode{return ranges::iter_move(get(i.v_));} +\effects +Equivalent to: \tcode{return ranges::iter_move(get(i.v_));} \end{itemdescr} \indexlibrarymember{iter_swap}{common_iterator}% @@ -5021,7 +5083,8 @@ are each \tcode{true}. \pnum -\effects Equivalent to \tcode{ranges::iter_swap(get(x.v_), get(y.v_))}. +\effects +Equivalent to \tcode{ranges::iter_swap(get(x.v_), get(y.v_))}. \end{itemdescr} \rSec2[default.sentinels]{Default sentinels} @@ -5173,7 +5236,8 @@ \begin{itemdescr} \pnum -\expects \tcode{n >= 0}. +\expects +\tcode{n >= 0}. \pnum \effects @@ -5209,7 +5273,8 @@ \tcode{x.length} to \tcode{length}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec3[counted.iter.access]{Accessors} @@ -5221,7 +5286,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return current;} +\effects +Equivalent to: \tcode{return current;} \end{itemdescr} \indexlibrarymember{base}{counted_iterator}% @@ -5231,7 +5297,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::move(current)}. +\returns +\tcode{std::move(current)}. \end{itemdescr} \indexlibrarymember{count}{counted_iterator}% @@ -5241,7 +5308,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return length;} +\effects +Equivalent to: \tcode{return length;} \end{itemdescr} \rSec3[counted.iter.elem]{Element access} @@ -5255,7 +5323,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *current;} +\effects +Equivalent to: \tcode{return *current;} \end{itemdescr} \indexlibrarymember{operator[]}{counted_iterator}% @@ -5266,10 +5335,12 @@ \begin{itemdescr} \pnum -\expects \tcode{n < length}. +\expects +\tcode{n < length}. \pnum -\effects Equivalent to: \tcode{return current[n];} +\effects +Equivalent to: \tcode{return current[n];} \end{itemdescr} \rSec3[counted.iter.nav]{Navigation} @@ -5281,10 +5352,12 @@ \begin{itemdescr} \pnum -\expects \tcode{length > 0}. +\expects +\tcode{length > 0}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} ++current; --length; @@ -5299,10 +5372,12 @@ \begin{itemdescr} \pnum -\expects \tcode{length > 0}. +\expects +\tcode{length > 0}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} --length; try { return current++; } @@ -5318,7 +5393,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} counted_iterator tmp = *this; ++*this; @@ -5334,7 +5410,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} --current; ++length; @@ -5350,7 +5427,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} counted_iterator tmp = *this; --*this; @@ -5366,7 +5444,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return counted_iterator(current + n, length - n);} +\effects +Equivalent to: \tcode{return counted_iterator(current + n, length - n);} \end{itemdescr} \indexlibrarymember{operator+}{counted_iterator}% @@ -5378,7 +5457,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x + n;} +\effects +Equivalent to: \tcode{return x + n;} \end{itemdescr} \indexlibrarymember{operator+=}{counted_iterator}% @@ -5389,10 +5469,12 @@ \begin{itemdescr} \pnum -\expects \tcode{n <= length}. +\expects +\tcode{n <= length}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} current += n; length -= n; @@ -5408,7 +5490,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return counted_iterator(current - n, length + n);} +\effects +Equivalent to: \tcode{return counted_iterator(current - n, length + n);} \end{itemdescr} \indexlibrarymember{operator-}{counted_iterator}% @@ -5425,7 +5508,8 @@ sequence\iref{counted.iterator}. \pnum -\effects Equivalent to: \tcode{return y.length - x.length;} +\effects +Equivalent to: \tcode{return y.length - x.length;} \end{itemdescr} \indexlibrarymember{operator-}{counted_iterator}% @@ -5436,7 +5520,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return -x.length;} \end{itemdescr} @@ -5448,7 +5533,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return y.length;} +\effects +Equivalent to: \tcode{return y.length;} \end{itemdescr} \indexlibrarymember{operator-=}{counted_iterator}% @@ -5459,10 +5545,12 @@ \begin{itemdescr} \pnum -\expects \tcode{-n <= length}. +\expects +\tcode{-n <= length}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} current -= n; length += n; @@ -5486,7 +5574,8 @@ elements of the same sequence\iref{counted.iterator}. \pnum -\effects Equivalent to: \tcode{return x.length == y.length;} +\effects +Equivalent to: \tcode{return x.length == y.length;} \end{itemdescr} \indexlibrarymember{operator==}{counted_iterator}% @@ -5497,7 +5586,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.length == 0;} +\effects +Equivalent to: \tcode{return x.length == 0;} \end{itemdescr} \indexlibrarymember{operator<=>}{counted_iterator}% @@ -5536,7 +5626,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return ranges::iter_move(i.current);} +\effects +Equivalent to: \tcode{return ranges::iter_move(i.current);} \end{itemdescr} \indexlibrarymember{iter_swap}{counted_iterator}% @@ -5549,7 +5640,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{ranges::iter_swap(x.current, y.current)}. +\effects +Equivalent to \tcode{ranges::iter_swap(x.current, y.current)}. \end{itemdescr} \rSec2[unreachable.sentinels]{Unreachable sentinel} @@ -5670,7 +5762,8 @@ Constructs the end-of-stream iterator, value-initializing \tcode{value}. \pnum -\ensures \tcode{in_stream == nullptr} is \tcode{true}. +\ensures +\tcode{in_stream == nullptr} is \tcode{true}. \pnum \remarks @@ -5701,7 +5794,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{in_stream == x.in_stream} is \tcode{true}. +\ensures +\tcode{in_stream == x.in_stream} is \tcode{true}. \pnum \remarks @@ -5764,7 +5858,8 @@ \tcode{in_stream != nullptr} is \tcode{true}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} if (!(*in_stream >> value)) in_stream = nullptr; @@ -5782,10 +5877,12 @@ \begin{itemdescr} \pnum -\expects \tcode{in_stream != nullptr} is \tcode{true}. +\expects +\tcode{in_stream != nullptr} is \tcode{true}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} istream_iterator tmp = *this; ++*this; @@ -6178,7 +6275,8 @@ \begin{itemdescr} \pnum -\returns \tcode{i.equal(s)}. +\returns +\tcode{i.equal(s)}. \end{itemdescr} \rSec2[ostreambuf.iterator]{Class template \tcode{ostreambuf_iterator}} @@ -6340,7 +6438,8 @@ \begin{itemdescr} \pnum -\returns \tcode{c.begin()}. +\returns +\tcode{c.begin()}. \end{itemdescr} \indexlibrary{\idxcode{end(C\&)}}% @@ -6351,7 +6450,8 @@ \begin{itemdescr} \pnum -\returns \tcode{c.end()}. +\returns +\tcode{c.end()}. \end{itemdescr} \indexlibrary{\idxcode{begin(T (\&)[N])}}% @@ -6361,7 +6461,8 @@ \begin{itemdescr} \pnum -\returns \tcode{array}. +\returns +\tcode{array}. \end{itemdescr} \indexlibrary{\idxcode{end(T (\&)[N])}}% @@ -6371,7 +6472,8 @@ \begin{itemdescr} \pnum -\returns \tcode{array + N}. +\returns +\tcode{array + N}. \end{itemdescr} \indexlibrary{\idxcode{cbegin(const C\&)}}% @@ -6381,7 +6483,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{std::begin(c)}. +\returns +\tcode{std::begin(c)}. \end{itemdescr} \indexlibrary{\idxcode{cend(const C\&)}}% @@ -6391,7 +6494,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{std::end(c)}. +\returns +\tcode{std::end(c)}. \end{itemdescr} \indexlibrary{\idxcode{rbegin(C\&)}}% @@ -6401,7 +6505,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{c.rbegin()}. +\returns +\tcode{c.rbegin()}. \end{itemdescr} \indexlibrary{\idxcode{rend(C\&)}}% @@ -6411,7 +6516,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{c.rend()}. +\returns +\tcode{c.rend()}. \end{itemdescr} \indexlibrary{\idxcode{rbegin(T (\&array)[N])}}% @@ -6420,7 +6526,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{reverse_iterator(array + N)}. +\returns +\tcode{reverse_iterator(array + N)}. \end{itemdescr} \indexlibrary{\idxcode{rend(T (\&array)[N])}}% @@ -6429,7 +6536,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{reverse_iterator(array)}. +\returns +\tcode{reverse_iterator(array)}. \end{itemdescr} \indexlibrary{\idxcode{rbegin(initializer_list)}}% @@ -6438,7 +6546,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{reverse_iterator(il.end())}. +\returns +\tcode{reverse_iterator(il.end())}. \end{itemdescr} \indexlibrary{\idxcode{rend(initializer_list)}}% @@ -6447,7 +6556,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{reverse_iterator(il.begin())}. +\returns +\tcode{reverse_iterator(il.begin())}. \end{itemdescr} \indexlibrary{\idxcode{crbegin(const C\& c)}}% @@ -6456,7 +6566,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{std::rbegin(c)}. +\returns +\tcode{std::rbegin(c)}. \end{itemdescr} \indexlibrary{\idxcode{crend(const C\& c)}}% @@ -6465,7 +6576,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{std::rend(c)}. +\returns +\tcode{std::rend(c)}. \end{itemdescr} \indexlibrary{\idxcode{size(C\& c)}}% @@ -6474,7 +6586,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{c.size()}. +\returns +\tcode{c.size()}. \end{itemdescr} \indexlibrary{\idxcode{size(T (\&array)[N])}}% @@ -6483,7 +6596,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{N}. +\returns +\tcode{N}. \end{itemdescr} \indexlibrary{\idxcode{ssize(C\& c)}}% @@ -6505,7 +6619,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{N}. +\returns +\tcode{N}. \end{itemdescr} \indexlibrary{\idxcode{empty(C\& c)}}% @@ -6514,7 +6629,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{c.empty()}. +\returns +\tcode{c.empty()}. \end{itemdescr} \indexlibrary{\idxcode{empty(T (\&array)[N])}}% @@ -6523,7 +6639,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{false}. +\returns +\tcode{false}. \end{itemdescr} \indexlibrary{\idxcode{empty(initializer_list)}}% @@ -6532,7 +6649,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{il.size() == 0}. +\returns +\tcode{il.size() == 0}. \end{itemdescr} \indexlibrary{\idxcode{data(C\& c)}}% @@ -6542,7 +6660,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{c.data()}. +\returns +\tcode{c.data()}. \end{itemdescr} \indexlibrary{\idxcode{data(T (\&array)[N])}}% @@ -6551,7 +6670,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{array}. +\returns +\tcode{array}. \end{itemdescr} \indexlibrary{\idxcode{data(initializer_list)}}% @@ -6560,5 +6680,6 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{il.begin()}. +\returns +\tcode{il.begin()}. \end{itemdescr} diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 5737f15c86..2fc3c6feaa 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -594,7 +594,8 @@ \end{example} \item -\mandates the conditions that, if not met, render the program ill-formed. +\mandates +the conditions that, if not met, render the program ill-formed. \begin{example} An implementation might express such a condition via the \grammarterm{constant-expression} @@ -607,33 +608,42 @@ \end{example} \item -\expects the conditions (sometimes termed preconditions) +\expects +the conditions (sometimes termed preconditions) that the function assumes to hold whenever it is called. \item -\effects the actions performed by the function. +\effects +the actions performed by the function. \item -\sync the synchronization operations\iref{intro.multithread} applicable to the function. +\sync +the synchronization operations\iref{intro.multithread} applicable to the function. \item -\ensures the conditions (sometimes termed observable results or postconditions) +\ensures +the conditions (sometimes termed observable results or postconditions) established by the function. \item -\returns a description of the value(s) returned by the function. +\returns +a description of the value(s) returned by the function. \item -\throws any exceptions thrown by the function, and the conditions that would cause the exception. +\throws +any exceptions thrown by the function, and the conditions that would cause the exception. \item -\complexity the time and/or space complexity of the function. +\complexity +the time and/or space complexity of the function. \item -\remarks additional semantic constraints on the function. +\remarks +additional semantic constraints on the function. \item -\errors the error conditions for error codes reported by the function. +\errors +the error conditions for error codes reported by the function. \end{itemize} \pnum diff --git a/source/locales.tex b/source/locales.tex index a763aa1138..6225d70cda 100644 --- a/source/locales.tex +++ b/source/locales.tex @@ -639,7 +639,8 @@ \begin{itemdescr} \pnum -\effects The same as \tcode{locale(std_name.c_str())}. +\effects +The same as \tcode{locale(std_name.c_str())}. \end{itemdescr} \indexlibrary{\idxcode{locale}!constructor}% @@ -676,7 +677,8 @@ \begin{itemdescr} \pnum -\effects The same as \tcode{locale(other, std_name.c_str(), cat)}. +\effects +The same as \tcode{locale(other, std_name.c_str(), cat)}. \end{itemdescr} \indexlibrary{\idxcode{locale}!constructor}% @@ -3668,7 +3670,8 @@ \begin{itemdescr} \pnum -\returns \tcode{do_get(s, end, f, err, t, format, modifier)}. +\returns +\tcode{do_get(s, end, f, err, t, format, modifier)}. \end{itemdescr} \indexlibrarymember{get}{time_get}% @@ -3682,7 +3685,8 @@ \requires \range{fmt}{fmtend} shall be a valid range. \pnum -\effects The function starts by evaluating +\effects +The function starts by evaluating \tcode{err = ios_base::goodbit}. It then enters a loop, reading zero or more characters from \tcode{s} at each iteration. Unless otherwise specified below, the loop terminates when the first of the following conditions holds: @@ -3733,7 +3737,8 @@ multi-character sequences are considered while doing so. \end{note} \pnum -\returns \tcode{s}. +\returns +\tcode{s}. \end{itemdescr} \rSec4[locale.time.get.virtuals]{Virtual functions} @@ -3884,7 +3889,8 @@ \tcode{t} shall point to an object. \pnum -\effects The function starts by evaluating +\effects +The function starts by evaluating \tcode{err = ios_base::goodbit}. It then reads characters starting at \tcode{s} until it encounters an error, or until it has extracted and assigned those \tcode{struct tm} members, and any @@ -3909,14 +3915,16 @@ and may be outside their valid range. \pnum -\remarks It is unspecified whether multiple calls to +\remarks +It is unspecified whether multiple calls to \tcode{do_get()} with the address of the same \tcode{struct tm} object will update the current contents of the object or simply overwrite its members. Portable programs should zero out the object before invoking the function. \pnum -\returns An iterator pointing immediately beyond the last character +\returns +An iterator pointing immediately beyond the last character recognized as possibly part of a valid input sequence for the given \tcode{format} and \tcode{modifier}. \end{itemdescr} diff --git a/source/numerics.tex b/source/numerics.tex index e455f07b71..0802ea3c32 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -469,7 +469,8 @@ \begin{itemdescr} \pnum -\returns The value of the real component. +\returns +The value of the real component. \end{itemdescr} \indexlibrarymember{real}{complex}% @@ -479,7 +480,8 @@ \begin{itemdescr} \pnum -\effects Assigns \tcode{val} to the real component. +\effects +Assigns \tcode{val} to the real component. \end{itemdescr} \indexlibrarymember{imag}{complex}% @@ -489,7 +491,8 @@ \begin{itemdescr} \pnum -\returns The value of the imaginary component. +\returns +The value of the imaginary component. \end{itemdescr} \indexlibrarymember{imag}{complex}% @@ -499,7 +502,8 @@ \begin{itemdescr} \pnum -\effects Assigns \tcode{val} to the imaginary component. +\effects +Assigns \tcode{val} to the imaginary component. \end{itemdescr} \rSec2[complex.member.ops]{Member operators} @@ -902,7 +906,8 @@ \begin{itemdescr} \pnum -\returns The projection of \tcode{x} onto the Riemann sphere. +\returns +The projection of \tcode{x} onto the Riemann sphere. \pnum \remarks @@ -939,7 +944,8 @@ \begin{itemdescr} \pnum -\returns The complex arc cosine of \tcode{x}. +\returns +The complex arc cosine of \tcode{x}. \pnum \remarks @@ -955,7 +961,8 @@ \begin{itemdescr} \pnum -\returns The complex arc sine of \tcode{x}. +\returns +The complex arc sine of \tcode{x}. \pnum \remarks @@ -971,7 +978,8 @@ \begin{itemdescr} \pnum -\returns The complex arc tangent of \tcode{x}. +\returns +The complex arc tangent of \tcode{x}. \pnum \remarks @@ -987,7 +995,8 @@ \begin{itemdescr} \pnum -\returns The complex arc hyperbolic cosine of \tcode{x}. +\returns +The complex arc hyperbolic cosine of \tcode{x}. \pnum \remarks @@ -1003,7 +1012,8 @@ \begin{itemdescr} \pnum -\returns The complex arc hyperbolic sine of \tcode{x}. +\returns +The complex arc hyperbolic sine of \tcode{x}. \pnum \remarks @@ -1019,7 +1029,8 @@ \begin{itemdescr} \pnum -\returns The complex arc hyperbolic tangent of \tcode{x}. +\returns +The complex arc hyperbolic tangent of \tcode{x}. \pnum \remarks @@ -3067,7 +3078,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{linear_congruential_engine} object. +\effects +Constructs a \tcode{linear_congruential_engine} object. If $c \bmod m$ is $0$ and $\tcode{s} \bmod m$ is $0$, sets the engine's state to $1$, otherwise sets the engine's state to $\tcode{s} \bmod m$. @@ -3080,7 +3092,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{linear_congruential_engine} object. +\effects +Constructs a \tcode{linear_congruential_engine} object. With $k = \left\lceil \frac{\log_2 m}{32} \right\rceil$ and $a$ an array (or equivalent) @@ -3239,7 +3252,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{mersenne_twister_engine} object. +\effects +Constructs a \tcode{mersenne_twister_engine} object. Sets $X_{-n}$ to $\tcode{value} \bmod 2^w$. Then, iteratively for $i = 1 - n, \dotsc, -1$, sets $X_i$ to \[% @@ -3252,7 +3266,8 @@ \]% \pnum -\complexity \bigoh{n}. +\complexity +\bigoh{n}. \end{itemdescr} \indexlibrary{\idxcode{mersenne_twister_engine}!constructor}% @@ -3262,7 +3277,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{mersenne_twister_engine} object. +\effects +Constructs a \tcode{mersenne_twister_engine} object. With $k = \left\lceil w / 32 \right\rceil$ and $a$ an array (or equivalent) @@ -3393,7 +3409,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{subtract_with_carry_engine} object. +\effects +Constructs a \tcode{subtract_with_carry_engine} object. Sets the values of $X_{-r}, \dotsc, X_{-1}$, in that order, as specified below. @@ -3415,7 +3432,8 @@ Set $X_k$ to $\left( \sum_{j=0}^{n-1} z_j \cdot 2^{32j}\right) \bmod m$. \pnum -\complexity Exactly $n \cdot \tcode{r}$ invocations +\complexity +Exactly $n \cdot \tcode{r}$ invocations of \tcode{e}. \end{itemdescr} @@ -3428,7 +3446,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{subtract_with_carry_engine} object. +\effects +Constructs a \tcode{subtract_with_carry_engine} object. With $k = \left\lceil w / 32 \right\rceil$ and $a$ an array (or equivalent) @@ -4112,7 +4131,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{random_device} +\effects +Constructs a \tcode{random_device} nondeterministic uniform random bit generator object. The semantics of the \tcode{token} parameter and the token value used by the default constructor are @@ -4123,7 +4143,8 @@ } \pnum -\throws A value of an \impldef{exception type when \tcode{random_device} constructor fails} type +\throws +A value of an \impldef{exception type when \tcode{random_device} constructor fails} type derived from \tcode{exception} if the \tcode{random_device} could not be initialized. \end{itemdescr} @@ -4135,7 +4156,8 @@ \begin{itemdescr} \pnum -\returns If the implementation employs a random number engine, +\returns +If the implementation employs a random number engine, returns $0.0$. Otherwise, returns an entropy estimate\footnote{If a device has $n$ states whose respective probabilities are @@ -4156,14 +4178,16 @@ \begin{itemdescr} \pnum -\returns A nondeterministic random value, +\returns +A nondeterministic random value, uniformly distributed between \tcode{min()} and \tcode{max()} (inclusive). It is \impldef{how \tcode{random_device::operator()} generates values} how these values are generated. \pnum -\throws A value of an \impldef{exception type when \tcode{random_device::operator()} fails} +\throws +A value of an \impldef{exception type when \tcode{random_device::operator()} fails} type derived from \tcode{exception} if a random number could not be obtained. \end{itemdescr} @@ -4227,11 +4251,13 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{seed_seq} object +\effects +Constructs a \tcode{seed_seq} object as if by default-constructing its member \tcode{v}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} @@ -4267,7 +4293,8 @@ shall denote an integer type. \pnum -\effects Constructs a \tcode{seed_seq} object +\effects +Constructs a \tcode{seed_seq} object by the following algorithm: \begin{codeblock} for (InputIterator s = begin; s != end; ++s) @@ -4379,12 +4406,14 @@ \begin{itemdescr} \pnum -\returns The number of 32-bit units +\returns +The number of 32-bit units that would be returned by a call to \tcode{param()}. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \indexlibrarymember{param}{seed_seq}% @@ -4404,7 +4433,8 @@ shall be valid for a value \tcode{rt} of type \tcode{result_type}. \pnum -\effects Copies the sequence of prepared 32-bit units +\effects +Copies the sequence of prepared 32-bit units to the given destination, as if by executing the following statement: \begin{codeblock} @@ -4457,7 +4487,8 @@ \begin{itemdescr} \pnum -\complexity Exactly +\complexity +Exactly $k = \max(1, \left\lceil b / \log_2 R \right\rceil)$ invocations of \tcode{g}, @@ -4483,10 +4514,12 @@ \tcode{RealType}. \pnum -\returns $S / R^k$. +\returns +$S / R^k$. \pnum -\throws What and when \tcode{g} throws. +\throws +What and when \tcode{g} throws. \end{itemdescr}% \indextext{random number generation!utilities|)} @@ -4606,7 +4639,8 @@ $\tcode{a} \leq \tcode{b}$. \pnum -\effects Constructs a \tcode{uniform_int_distribution} object; +\effects +Constructs a \tcode{uniform_int_distribution} object; \tcode{a} and \tcode{b} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -4618,7 +4652,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{a} parameter +\returns +The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -4629,7 +4664,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{b} parameter +\returns +The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr} @@ -4699,7 +4735,8 @@ $\tcode{b} - \tcode{a} \leq \tcode{numeric_limits::max()}$. \pnum -\effects Constructs a \tcode{uniform_real_distribution} object; +\effects +Constructs a \tcode{uniform_real_distribution} object; \tcode{a} and \tcode{b} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -4711,7 +4748,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{a} parameter +\returns +The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -4722,7 +4760,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{b} parameter +\returns +The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr}% \indextext{random number distributions!uniform|)}% @@ -4801,7 +4840,8 @@ $0 \leq \tcode{p} \leq 1$. \pnum -\effects Constructs a \tcode{bernoulli_distribution} object; +\effects +Constructs a \tcode{bernoulli_distribution} object; \tcode{p} corresponds to the parameter of the distribution. \end{itemdescr} @@ -4813,7 +4853,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{p} parameter +\returns +The value of the \tcode{p} parameter with which the object was constructed. \end{itemdescr} @@ -4877,7 +4918,8 @@ $0 \leq \tcode{p} \leq 1$ and $0 \leq \tcode{t} $. \pnum -\effects Constructs a \tcode{binomial_distribution} object; +\effects +Constructs a \tcode{binomial_distribution} object; \tcode{t} and \tcode{p} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -4888,7 +4930,8 @@ \end{itemdecl}% \begin{itemdescr} \pnum -\returns The value of the \tcode{t} parameter +\returns +The value of the \tcode{t} parameter with which the object was constructed. \end{itemdescr} @@ -4899,7 +4942,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{p} parameter +\returns +The value of the \tcode{p} parameter with which the object was constructed. \end{itemdescr} @@ -4962,7 +5006,8 @@ $0 < \tcode{p} < 1$. \pnum -\effects Constructs a \tcode{geometric_distribution} object; +\effects +Constructs a \tcode{geometric_distribution} object; \tcode{p} corresponds to the parameter of the distribution. \end{itemdescr} @@ -4974,7 +5019,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{p} parameter +\returns +The value of the \tcode{p} parameter with which the object was constructed. \end{itemdescr} @@ -5043,7 +5089,8 @@ and $0 < \tcode{k} $. \pnum -\effects Constructs a \tcode{negative_binomial_distribution} object; +\effects +Constructs a \tcode{negative_binomial_distribution} object; \tcode{k} and \tcode{p} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -5055,7 +5102,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{k} parameter +\returns +The value of the \tcode{k} parameter with which the object was constructed. \end{itemdescr} @@ -5066,7 +5114,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{p} parameter +\returns +The value of the \tcode{p} parameter with which the object was constructed. \end{itemdescr}% \indextext{random number distributions!Bernoulli|)}% @@ -5146,7 +5195,8 @@ \requires $0 < \tcode{mean}$. \pnum -\effects Constructs a \tcode{poisson_distribution} object; +\effects +Constructs a \tcode{poisson_distribution} object; \tcode{mean} corresponds to the parameter of the distribution. \end{itemdescr} @@ -5157,7 +5207,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{mean} parameter +\returns +The value of the \tcode{mean} parameter with which the object was constructed. \end{itemdescr} @@ -5219,7 +5270,8 @@ \requires $0 < \tcode{lambda}$. \pnum -\effects Constructs an \tcode{exponential_distribution} object; +\effects +Constructs an \tcode{exponential_distribution} object; \tcode{lambda} corresponds to the parameter of the distribution. \end{itemdescr} @@ -5230,7 +5282,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{lambda} parameter +\returns +The value of the \tcode{lambda} parameter with which the object was constructed. \end{itemdescr} @@ -5295,7 +5348,8 @@ \requires $0 < \tcode{alpha}$ and $0 < \tcode{beta}$. \pnum -\effects Constructs a \tcode{gamma_distribution} object; +\effects +Constructs a \tcode{gamma_distribution} object; \tcode{alpha} and \tcode{beta} correspond to the parameters of the distribution. \end{itemdescr} @@ -5307,7 +5361,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{alpha} parameter +\returns +The value of the \tcode{alpha} parameter with which the object was constructed. \end{itemdescr} @@ -5318,7 +5373,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{beta} parameter +\returns +The value of the \tcode{beta} parameter with which the object was constructed. \end{itemdescr} @@ -5384,7 +5440,8 @@ \requires $0 < \tcode{a}$ and $0 < \tcode{b}$. \pnum -\effects Constructs a \tcode{weibull_distribution} object; +\effects +Constructs a \tcode{weibull_distribution} object; \tcode{a} and \tcode{b} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -5396,7 +5453,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{a} parameter +\returns +The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -5407,7 +5465,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{b} parameter +\returns +The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr} @@ -5480,7 +5539,8 @@ \requires $0 < \tcode{b}$. \pnum -\effects Constructs an \tcode{extreme_value_distribution} object; +\effects +Constructs an \tcode{extreme_value_distribution} object; \tcode{a} and \tcode{b} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -5492,7 +5552,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{a} parameter +\returns +The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -5503,7 +5564,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{b} parameter +\returns +The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr}% \indextext{random number distributions!Poisson|)}% @@ -5597,7 +5659,8 @@ \requires $0 < \tcode{stddev}$. \pnum -\effects Constructs a \tcode{normal_distribution} object; +\effects +Constructs a \tcode{normal_distribution} object; \tcode{mean} and \tcode{stddev} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -5609,7 +5672,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{mean} parameter +\returns +The value of the \tcode{mean} parameter with which the object was constructed. \end{itemdescr} @@ -5620,7 +5684,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{stddev} parameter +\returns +The value of the \tcode{stddev} parameter with which the object was constructed. \end{itemdescr} @@ -5686,7 +5751,8 @@ \requires $0 < \tcode{s}$. \pnum -\effects Constructs a \tcode{lognormal_distribution} object; +\effects +Constructs a \tcode{lognormal_distribution} object; \tcode{m} and \tcode{s} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -5698,7 +5764,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{m} parameter +\returns +The value of the \tcode{m} parameter with which the object was constructed. \end{itemdescr} @@ -5709,7 +5776,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{s} parameter +\returns +The value of the \tcode{s} parameter with which the object was constructed. \end{itemdescr} @@ -5772,7 +5840,8 @@ \requires $0 < \tcode{n}$. \pnum -\effects Constructs a \tcode{chi_squared_distribution} object; +\effects +Constructs a \tcode{chi_squared_distribution} object; \tcode{n} corresponds to the parameter of the distribution. \end{itemdescr} @@ -5783,7 +5852,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{n} parameter +\returns +The value of the \tcode{n} parameter with which the object was constructed. \end{itemdescr} @@ -5847,7 +5917,8 @@ \requires $0 < \tcode{b}$. \pnum -\effects Constructs a \tcode{cauchy_distribution} object; +\effects +Constructs a \tcode{cauchy_distribution} object; \tcode{a} and \tcode{b} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -5859,7 +5930,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{a} parameter +\returns +The value of the \tcode{a} parameter with which the object was constructed. \end{itemdescr} @@ -5870,7 +5942,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{b} parameter +\returns +The value of the \tcode{b} parameter with which the object was constructed. \end{itemdescr} @@ -5938,7 +6011,8 @@ \requires $0 < \tcode{m}$ and $0 < \tcode{n}$. \pnum -\effects Constructs a \tcode{fisher_f_distribution} object; +\effects +Constructs a \tcode{fisher_f_distribution} object; \tcode{m} and \tcode{n} correspond to the respective parameters of the distribution. \end{itemdescr} @@ -5950,7 +6024,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{m} parameter +\returns +The value of the \tcode{m} parameter with which the object was constructed. \end{itemdescr} @@ -5961,7 +6036,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{n} parameter +\returns +The value of the \tcode{n} parameter with which the object was constructed. \end{itemdescr} @@ -6027,7 +6103,8 @@ \requires $0 < \tcode{n}$. \pnum -\effects Constructs a \tcode{student_t_distribution} object; +\effects +Constructs a \tcode{student_t_distribution} object; \tcode{n} corresponds to the parameter of the distribution. \end{itemdescr} @@ -6038,7 +6115,8 @@ \begin{itemdescr} \pnum -\returns The value of the \tcode{n} parameter +\returns +The value of the \tcode{n} parameter with which the object was constructed. \end{itemdescr}% \indextext{random number distributions!normal|)}% @@ -6127,7 +6205,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{discrete_distribution} object +\effects +Constructs a \tcode{discrete_distribution} object with $n = 1$ and $p_0 = 1$. \begin{note} Such an object will always deliver the value $0$. @@ -6156,7 +6235,8 @@ shall form a sequence $w$ of length $n > 0$. \pnum -\effects Constructs a \tcode{discrete_distribution} object +\effects +Constructs a \tcode{discrete_distribution} object with probabilities given by the formula above. \end{itemdescr} @@ -6193,7 +6273,8 @@ shall hold. \pnum -\effects Constructs a \tcode{discrete_distribution} object +\effects +Constructs a \tcode{discrete_distribution} object with probabilities given by the formula above, using the following values: If $\tcode{nw} = 0$, @@ -6214,7 +6295,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{vector} +\returns +A \tcode{vector} whose \tcode{size} member returns $n$ and whose \tcode{operator[]} member returns $p_k$ when invoked with argument $k$ for $k = 0, \dotsc, n - 1$. @@ -6306,7 +6388,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{piecewise_constant_distribution} object +\effects +Constructs a \tcode{piecewise_constant_distribution} object with $n = 1$, $\rho_0 = 1$, $b_0 = 0$, @@ -6346,7 +6429,8 @@ and any $w_k$ for $k \geq n$ shall be ignored by the distribution. \pnum -\effects Constructs a \tcode{piecewise_constant_distribution} object +\effects +Constructs a \tcode{piecewise_constant_distribution} object with parameters as specified above. \end{itemdescr} @@ -6368,7 +6452,8 @@ to the type of \tcode{UnaryOperation}'s sole parameter. \pnum -\effects Constructs a \tcode{piecewise_constant_distribution} object +\effects +Constructs a \tcode{piecewise_constant_distribution} object with parameters taken or calculated from the following values: If $\tcode{bl.size()} < 2$, @@ -6409,7 +6494,8 @@ shall hold. \pnum -\effects Constructs a \tcode{piecewise_constant_distribution} object +\effects +Constructs a \tcode{piecewise_constant_distribution} object with parameters taken or calculated from the following values: Let $b_k = \tcode{xmin} + k \cdot \delta $ for $ k = 0, \dotsc, n$, @@ -6427,7 +6513,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{vector} +\returns +A \tcode{vector} whose \tcode{size} member returns $n + 1$ and whose $ \tcode{operator[]} $ member returns $b_k$ when invoked with argument $k$ for $k = 0, \dotsc, n $. @@ -6440,7 +6527,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{vector} +\returns +A \tcode{vector} whose \tcode{size} member returns $n$ and whose $ \tcode{operator[]} $ member returns $\rho_k$ when invoked with argument $k$ for $k = 0, \dotsc, n - 1$. @@ -6530,7 +6618,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{piecewise_linear_distribution} object +\effects +Constructs a \tcode{piecewise_linear_distribution} object with $n = 1$, $\rho_0 = \rho_1 = 1$, $b_0 = 0$, @@ -6569,7 +6658,8 @@ and any $w_k$ for $k \geq n + 1$ shall be ignored by the distribution. \pnum -\effects Constructs a \tcode{piecewise_linear_distribution} object +\effects +Constructs a \tcode{piecewise_linear_distribution} object with parameters as specified above. \end{itemdescr} @@ -6591,7 +6681,8 @@ to the type of \tcode{UnaryOperation}'s sole parameter. \pnum -\effects Constructs a \tcode{piecewise_linear_distribution} object +\effects +Constructs a \tcode{piecewise_linear_distribution} object with parameters taken or calculated from the following values: If $\tcode{bl.size()} < 2$, @@ -6632,7 +6723,8 @@ shall hold. \pnum -\effects Constructs a \tcode{piecewise_linear_distribution} object +\effects +Constructs a \tcode{piecewise_linear_distribution} object with parameters taken or calculated from the following values: Let $b_k = \tcode{xmin} + k \cdot \delta$ for $k = 0, \dotsc, n$, @@ -6650,7 +6742,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{vector} +\returns +A \tcode{vector} whose \tcode{size} member returns $n + 1$ and whose $ \tcode{operator[]} $ member returns $b_k$ when invoked with argument $k$ for $k = 0, \dotsc, n$. @@ -6663,7 +6756,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{vector} +\returns +A \tcode{vector} whose \tcode{size} member returns $n$ and whose $ \tcode{operator[]} $ member returns $\rho_k$ when invoked with argument $k$ for $k = 0, \dotsc, n$. @@ -7170,7 +7264,8 @@ elements of \tcode{v}. \pnum -\complexity Constant. +\complexity +Constant. \end{itemdescr} \indexlibrary{\idxcode{valarray}!constructor}% @@ -7180,7 +7275,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{valarray(il.begin(), il.size())}. +\effects +Equivalent to \tcode{valarray(il.begin(), il.size())}. \end{itemdescr} \indexlibrary{\idxcode{valarray}!constructor}% @@ -7229,10 +7325,12 @@ as if by calling \tcode{resize(v.size())}, before performing the assignment. \pnum -\ensures \tcode{size() == v.size()}. +\ensures +\tcode{size() == v.size()}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{valarray}% @@ -7242,14 +7340,17 @@ \begin{itemdescr} \pnum -\effects \tcode{*this} obtains the value of \tcode{v}. +\effects +\tcode{*this} obtains the value of \tcode{v}. The value of \tcode{v} after the assignment is not specified. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\complexity Linear. +\complexity +Linear. \end{itemdescr} \indexlibrarymember{operator=}{valarray}% @@ -7259,7 +7360,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *this = valarray(il);} +\effects +Equivalent to: \tcode{return *this = valarray(il);} \end{itemdescr} @@ -7274,7 +7376,8 @@ Assigns \tcode{v} to each element of \tcode{*this}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{valarray}% @@ -7369,7 +7472,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{valarray} containing those +\returns +A \tcode{valarray} containing those elements of the controlled sequence designated by \tcode{slicearr}. \begin{example} \begin{codeblock} @@ -7386,7 +7490,8 @@ \begin{itemdescr} \pnum -\returns An object that holds references to elements of the controlled +\returns +An object that holds references to elements of the controlled sequence selected by \tcode{slicearr}. \begin{example} \begin{codeblock} valarray v0("abcdefghijklmnop", 16); @@ -7404,7 +7509,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{valarray} containing those +\returns +A \tcode{valarray} containing those elements of the controlled sequence designated by \tcode{gslicearr}. \begin{example} \begin{codeblock} @@ -7425,7 +7531,8 @@ \begin{itemdescr} \pnum -\returns An object that holds references to elements of the controlled +\returns +An object that holds references to elements of the controlled sequence selected by \tcode{gslicearr}. \begin{example} \begin{codeblock} valarray v0("abcdefghijklmnop", 16); @@ -7446,7 +7553,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{valarray} containing those +\returns +A \tcode{valarray} containing those elements of the controlled sequence designated by \tcode{boolarr}. \begin{example} \begin{codeblock} @@ -7465,7 +7573,8 @@ \begin{itemdescr} \pnum -\returns An object that holds references to elements of the controlled +\returns +An object that holds references to elements of the controlled sequence selected by \tcode{boolarr}. \begin{example} \begin{codeblock} valarray v0("abcdefghijklmnop", 16); @@ -7484,7 +7593,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{valarray} containing those +\returns +A \tcode{valarray} containing those elements of the controlled sequence designated by \tcode{indarr}. \begin{example} \begin{codeblock} @@ -7503,7 +7613,8 @@ \begin{itemdescr} \pnum -\returns An object that holds references to elements of the controlled +\returns +An object that holds references to elements of the controlled sequence selected by \tcode{indarr}. \begin{example} \begin{codeblock} valarray v0("abcdefghijklmnop", 16); @@ -7538,7 +7649,8 @@ \tcode{T} (\tcode{bool} for \tcode{operator!}). \pnum -\returns A \tcode{valarray} whose length is \tcode{size()}. +\returns +A \tcode{valarray} whose length is \tcode{size()}. Each element of the returned array is initialized with the result of applying the indicated operator to the corresponding element of the array. \end{itemdescr} @@ -7648,11 +7760,13 @@ \begin{itemdescr} \pnum -\effects \tcode{*this} obtains the value of +\effects +\tcode{*this} obtains the value of \tcode{v}. \tcode{v} obtains the value of \tcode{*this}. \pnum -\complexity Constant. +\complexity +Constant. \end{itemdescr} \indexlibrarymember{size}{valarray}% @@ -7662,10 +7776,12 @@ \begin{itemdescr} \pnum -\returns The number of elements in the array. +\returns +The number of elements in the array. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \indexlibrarymember{sum}{valarray}% @@ -8074,7 +8190,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{x.swap(y)}. +\effects +Equivalent to \tcode{x.swap(y)}. \end{itemdescr} @@ -8149,11 +8266,13 @@ \begin{itemdescr} \pnum -\returns The start, length, or stride specified +\returns +The start, length, or stride specified by a \tcode{slice} object. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \rSec3[slice.ops]{Operators} @@ -8445,11 +8564,13 @@ \begin{itemdescr} \pnum -\returns The representation of the +\returns +The representation of the start, lengths, or strides specified for the \tcode{gslice}. \pnum -\complexity \tcode{start()} is constant time. \tcode{size()} and \tcode{stride()} +\complexity +\tcode{start()} is constant time. \tcode{size()} and \tcode{stride()} are linear in the number of strides. \end{itemdescr} @@ -8879,7 +9000,8 @@ \begin{itemdescr} \pnum -\returns An iterator referencing the first value in the array. +\returns +An iterator referencing the first value in the array. \end{itemdescr} \indexlibrary{\idxcode{end}!\idxcode{valarray}}% @@ -8890,7 +9012,8 @@ \begin{itemdescr} \pnum -\returns An iterator referencing one past the last value in the array. +\returns +An iterator referencing one past the last value in the array. \end{itemdescr} \rSec1[c.math]{Mathematical functions for floating-point types} @@ -9740,7 +9863,8 @@ \begin{itemdescr} \pnum -\returns $\sqrt{x^2+y^2+z^2}$. +\returns +$\sqrt{x^2+y^2+z^2}$. \end{itemdescr} \rSec2[c.math.lerp]{Linear interpolation} diff --git a/source/ranges.tex b/source/ranges.tex index 1e9c9b7929..e60523ca6e 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1189,10 +1189,12 @@ \begin{itemdescr} \pnum -\expects \tcode{!empty()}. +\expects +\tcode{!empty()}. \pnum -\effects Equivalent to: \tcode{return *ranges::begin(derived());} +\effects +Equivalent to: \tcode{return *ranges::begin(derived());} \end{itemdescr} \indexlibrary{\idxcode{view_interface}!\idxcode{back}}% @@ -1204,10 +1206,12 @@ \begin{itemdescr} \pnum -\expects \tcode{!empty()}. +\expects +\tcode{!empty()}. \pnum -\effects Equivalent to: \tcode{return *ranges::prev(ranges::end(derived()));} +\effects +Equivalent to: \tcode{return *ranges::prev(ranges::end(derived()));} \end{itemdescr} \rSec2[range.subrange]{Sub-ranges} @@ -1355,10 +1359,12 @@ \begin{itemdescr} \pnum -\expects \range{i}{s} is a valid range. +\expects +\range{i}{s} is a valid range. \pnum -\effects Initializes \tcode{begin_} with \tcode{i} and \tcode{end_} with +\effects +Initializes \tcode{begin_} with \tcode{i} and \tcode{end_} with \tcode{s}. \end{itemdescr} @@ -1370,11 +1376,13 @@ \begin{itemdescr} \pnum -\expects \range{i}{s} is a valid range, and +\expects +\range{i}{s} is a valid range, and \tcode{n == \placeholdernc{make-unsigned-like}(ranges::distance(i, s))}. \pnum -\effects Initializes \tcode{begin_} with \tcode{i} and \tcode{end_} with +\effects +Initializes \tcode{begin_} with \tcode{i} and \tcode{end_} with \tcode{s}. If \tcode{StoreSize} is \tcode{true}, initializes \tcode{size_} with \tcode{n}. @@ -1397,7 +1405,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{itemize} \item If \tcode{StoreSize} is \tcode{true}, \tcode{subrange\{ranges::begin(r), ranges::end(r), ranges::size(r)\}}. @@ -1414,7 +1423,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return PairLike(begin_, end_);} +\effects +Equivalent to: \tcode{return PairLike(begin_, end_);} \end{itemdescr} \rSec3[range.subrange.access]{Accessors} @@ -1426,7 +1436,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return begin_;} +\effects +Equivalent to: \tcode{return begin_;} \end{itemdescr} \indexlibrary{\idxcode{end}!\idxcode{subrange}}% @@ -1436,7 +1447,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return end_;} +\effects +Equivalent to: \tcode{return end_;} \end{itemdescr} \indexlibrary{\idxcode{empty}!\idxcode{subrange}}% @@ -1446,7 +1458,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return begin_ == end_;} +\effects +Equivalent to: \tcode{return begin_ == end_;} \end{itemdescr} \indexlibrary{\idxcode{size}!\idxcode{subrange}}% @@ -1471,7 +1484,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; tmp.advance(n); @@ -1493,7 +1507,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; tmp.advance(-n); @@ -1508,7 +1523,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{itemize} \item If \tcode{StoreSize} is \tcode{true}, \begin{codeblock} @@ -1536,7 +1552,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} if constexpr (N == 0) return r.begin(); @@ -1685,7 +1702,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{value_} with \tcode{t}. +\effects +Initializes \tcode{value_} with \tcode{t}. \end{itemdescr} \indexlibrary{\idxcode{single_view}!\idxcode{single_view}}% @@ -1695,7 +1713,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{value_} with \tcode{std::move(t)}. +\effects +Initializes \tcode{value_} with \tcode{std::move(t)}. \end{itemdescr} \indexlibrary{\idxcode{single_view}!\idxcode{single_view}}% @@ -1706,7 +1725,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{value_} as if by +\effects +Initializes \tcode{value_} as if by \tcode{value_\{in_place, std::forward(args)...\}}. \end{itemdescr} @@ -1718,7 +1738,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return data();} +\effects +Equivalent to: \tcode{return data();} \end{itemdescr} \indexlibrary{\idxcode{end}!\idxcode{single_view}}% @@ -1729,7 +1750,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return data() + 1;} +\effects +Equivalent to: \tcode{return data() + 1;} \end{itemdescr} \indexlibrary{\idxcode{size}!\idxcode{single_view}}% @@ -1739,7 +1761,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return 1;} +\effects +Equivalent to: \tcode{return 1;} \end{itemdescr} \indexlibrary{\idxcode{data}!\idxcode{single_view}}% @@ -1750,7 +1773,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return value_.operator->();} +\effects +Equivalent to: \tcode{return value_.operator->();} \end{itemdescr} \rSec3[range.single.adaptor]{\tcode{views::single}} @@ -1928,7 +1952,8 @@ \tcode{Bound()} is reachable from \tcode{value}. \pnum -\effects Initializes \tcode{value_} with \tcode{value}. +\effects +Initializes \tcode{value_} with \tcode{value}. \end{itemdescr} \indexlibrary{\idxcode{iota_view}!\idxcode{iota_view}}% @@ -1945,7 +1970,8 @@ then \tcode{bool(value <= bound)} is \tcode{true}. \pnum -\effects Initializes \tcode{value_} with \tcode{value} and +\effects +Initializes \tcode{value_} with \tcode{value} and \tcode{bound_} with \tcode{bound}. \end{itemdescr} @@ -1956,7 +1982,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return iterator\{value_\};} +\effects +Equivalent to: \tcode{return iterator\{value_\};} \end{itemdescr} \indexlibrary{\idxcode{end}!\idxcode{iota_view}}% @@ -1966,7 +1993,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} if constexpr (same_as) return unreachable_sentinel; @@ -1982,7 +2010,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return iterator\{bound_\};} +\effects +Equivalent to: \tcode{return iterator\{bound_\};} \end{itemdescr} \indexlibrarymember{size}{iota_view}% @@ -1992,7 +2021,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} if constexpr (@\placeholdernc{is-integer-like}@ && @\placeholdernc{is-integer-like}@) return (value_ < 0) @@ -2005,7 +2035,8 @@ \end{codeblock} \pnum -\remarks The expression in the \grammarterm{requires-clause} is equivalent to +\remarks +The expression in the \grammarterm{requires-clause} is equivalent to \begin{codeblock} (same_as && @\placeholder{advanceable}@) || (integral && integral) || sized_sentinel_for @@ -2096,7 +2127,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{value_} with \tcode{value}. +\effects +Initializes \tcode{value_} with \tcode{value}. \end{itemdescr} \indexlibrary{\idxcode{operator*}!\idxcode{iota_view::iterator}} @@ -2106,7 +2138,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return value_;} +\effects +Equivalent to: \tcode{return value_;} \pnum \begin{note} @@ -2122,7 +2155,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} ++value_; return *this; @@ -2136,7 +2170,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{++*this}. +\effects +Equivalent to \tcode{++*this}. \end{itemdescr} \indexlibrary{\idxcode{operator++}!\idxcode{iota_view::iterator}} @@ -2146,7 +2181,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; ++*this; @@ -2161,7 +2197,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} --value_; return *this; @@ -2175,7 +2212,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; --*this; @@ -2191,7 +2229,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} if constexpr (@\placeholdernc{is-integer-like}@ && !@\placeholdernc{is-signed-integer-like}@) { if (n >= difference_type(0)) @@ -2213,7 +2252,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} if constexpr (@\placeholdernc{is-integer-like}@ && !@\placeholdernc{is-signed-integer-like}@) { if (n >= difference_type(0)) @@ -2235,7 +2275,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return W(value_ + n);} +\effects +Equivalent to: \tcode{return W(value_ + n);} \end{itemdescr} \indexlibrary{\idxcode{operator==}!\idxcode{iota_view::iterator}} @@ -2246,7 +2287,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.value_ == y.value_;} +\effects +Equivalent to: \tcode{return x.value_ == y.value_;} \end{itemdescr} \indexlibrary{\idxcode{operator<}!\idxcode{iota_view::iterator}} @@ -2257,7 +2299,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.value_ < y.value_;} +\effects +Equivalent to: \tcode{return x.value_ < y.value_;} \end{itemdescr} \indexlibrary{\idxcode{operator>}!\idxcode{iota_view::iterator}} @@ -2268,7 +2311,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return y < x;} +\effects +Equivalent to: \tcode{return y < x;} \end{itemdescr} \indexlibrary{\idxcode{operator<=}!\idxcode{iota_view::iterator}} @@ -2279,7 +2323,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return !(y < x);} +\effects +Equivalent to: \tcode{return !(y < x);} \end{itemdescr} \indexlibrary{\idxcode{operator>=}!\idxcode{iota_view::iterator}} @@ -2290,7 +2335,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return !(x < y);} +\effects +Equivalent to: \tcode{return !(x < y);} \end{itemdescr} \indexlibrary{\idxcode{operator<=>}!\idxcode{iota_view::iterator}} @@ -2314,7 +2360,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return i += n;} +\effects +Equivalent to: \tcode{return i += n;} \end{itemdescr} \indexlibrary{\idxcode{operator+}!\idxcode{iota_view::iterator}} @@ -2325,7 +2372,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return i + n;} +\effects +Equivalent to: \tcode{return i + n;} \end{itemdescr} \indexlibrary{\idxcode{operator-}!\idxcode{iota_view::iterator}} @@ -2336,7 +2384,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return i -= n;} +\effects +Equivalent to: \tcode{return i -= n;} \end{itemdescr} \indexlibrary{\idxcode{operator-}!\idxcode{iota_view::iterator}} @@ -2347,7 +2396,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} using D = difference_type; if constexpr (@\placeholder{is-integer-like}@) { @@ -2392,7 +2442,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{bound_} with \tcode{bound}. +\effects +Initializes \tcode{bound_} with \tcode{bound}. \end{itemdescr} \indexlibrary{\idxcode{operator==}!\idxcode{iota_view::sentinel}} @@ -2402,7 +2453,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.value_ == y.bound_;} +\effects +Equivalent to: \tcode{return x.value_ == y.bound_;} \end{itemdescr} \begin{itemdecl} @@ -2412,7 +2464,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.value_ - y.bound_;} +\effects +Equivalent to: \tcode{return x.value_ - y.bound_;} \end{itemdescr} \begin{itemdecl} @@ -2422,7 +2475,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return -(y - x);} +\effects +Equivalent to: \tcode{return -(y - x);} \end{itemdescr} \rSec3[range.iota.adaptor]{\tcode{views::iota}} @@ -2630,7 +2684,8 @@ \begin{itemdescr} \pnum -\remarks Let \tcode{\placeholder{FUN}} denote the exposition-only functions +\remarks +Let \tcode{\placeholder{FUN}} denote the exposition-only functions \begin{codeblock} void @\placeholder{FUN}@(R&); void @\placeholder{FUN}@(R&&) = delete; @@ -2711,7 +2766,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{std::move(base)} and initializes +\effects +Initializes \tcode{base_} with \tcode{std::move(base)} and initializes \tcode{pred_} with \tcode{std::move(pred)}. \end{itemdescr} @@ -2724,7 +2780,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} +\effects +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and initializes \tcode{pred_} with \tcode{std::\brk{}move(pred)}. \end{itemdescr} @@ -2735,7 +2792,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return base_;} +\effects +Equivalent to: \tcode{return base_;} \end{itemdescr} \indexlibrary{\idxcode{begin}!\idxcode{filter_view}}% @@ -2753,7 +2811,8 @@ \tcode{\{*this, ranges::find_if(base_, ref(*pred_))\}}. \pnum -\remarks In order to provide the amortized constant time complexity required by +\remarks +In order to provide the amortized constant time complexity required by the \libconcept{range} concept, this function caches the result within the \tcode{filter_view} for use on subsequent calls. \end{itemdescr} @@ -2842,7 +2901,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{current_} with \tcode{current} and +\effects +Initializes \tcode{current_} with \tcode{current} and \tcode{parent_} with \tcode{addressof(parent)}. \end{itemdescr} @@ -2853,7 +2913,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return current_;} +\effects +Equivalent to: \tcode{return current_;} \end{itemdescr} \indexlibrary{\idxcode{operator*}!\idxcode{filter_view::iterator}}% @@ -2863,7 +2924,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *current_;} +\effects +Equivalent to: \tcode{return *current_;} \end{itemdescr} \indexlibrary{\idxcode{operator->}!\idxcode{filter_view::iterator}}% @@ -2885,7 +2947,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} current_ = ranges::find_if(++current_, ranges::end(parent_->base_), ref(*parent_->pred_)); return *this; @@ -2899,7 +2962,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{++*this}. +\effects +Equivalent to \tcode{++*this}. \end{itemdescr} \indexlibrary{\idxcode{operator++}!\idxcode{filter_view::iterator}}% @@ -2909,7 +2973,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; ++*this; @@ -2924,7 +2989,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} do --current_; @@ -2940,7 +3006,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; --*this; @@ -2956,7 +3023,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ == y.current_;} +\effects +Equivalent to: \tcode{return x.current_ == y.current_;} \end{itemdescr} \indexlibrary{\idxcode{iter_move}!\idxcode{filter_view::iterator}}% @@ -2967,7 +3035,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return ranges::iter_move(i.current_);} +\effects +Equivalent to: \tcode{return ranges::iter_move(i.current_);} \end{itemdescr} \indexlibrary{\idxcode{iter_swap}!\idxcode{filter_view::iterator}}% @@ -2979,7 +3048,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{ranges::iter_swap(x.current_, y.current_)}. +\effects +Equivalent to \tcode{ranges::iter_swap(x.current_, y.current_)}. \end{itemdescr} \rSec3[range.filter.sentinel]{Class \tcode{filter_view::sentinel}} @@ -3009,7 +3079,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{end_} with \tcode{ranges::end(parent.base_)}. +\effects +Initializes \tcode{end_} with \tcode{ranges::end(parent.base_)}. \end{itemdescr} \indexlibrary{\idxcode{base}!\idxcode{filter_view::sentinel}}% @@ -3019,7 +3090,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return end_;} +\effects +Equivalent to: \tcode{return end_;} \end{itemdescr} \indexlibrary{\idxcode{operator==}!\idxcode{filter_view::sentinel}}% @@ -3029,7 +3101,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ == y.end_;} +\effects +Equivalent to: \tcode{return x.current_ == y.end_;} \end{itemdescr} \rSec3[range.filter.adaptor]{\tcode{views::filter}} @@ -3118,7 +3191,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{std::move(base)} and +\effects +Initializes \tcode{base_} with \tcode{std::move(base)} and \tcode{fun_} with \tcode{std::move(fun)}. \end{itemdescr} @@ -3131,7 +3205,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} +\effects +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and \tcode{fun_} with \tcode{std::move(fun)}. \end{itemdescr} @@ -3142,7 +3217,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return base_;} +\effects +Equivalent to: \tcode{return base_;} \end{itemdescr} \indexlibrary{\idxcode{begin}!\idxcode{transform_view}}% @@ -3152,7 +3228,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return iterator{*this, ranges::begin(base_)}; \end{codeblock} @@ -3167,7 +3244,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return iterator{*this, ranges::begin(base_)}; \end{codeblock} @@ -3180,7 +3258,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return sentinel{ranges::end(base_)}; \end{codeblock} @@ -3193,7 +3272,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return iterator{*this, ranges::end(base_)}; \end{codeblock} @@ -3208,7 +3288,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return sentinel{ranges::end(base_)}; \end{codeblock} @@ -3223,7 +3304,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return iterator{*this, ranges::end(base_)}; \end{codeblock} @@ -3346,7 +3428,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{current_} with \tcode{current} and +\effects +Initializes \tcode{current_} with \tcode{current} and \tcode{parent_} with \tcode{addressof(parent)}. \end{itemdescr} @@ -3358,7 +3441,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{current_} with \tcode{std::move(i.current_)} and +\effects +Initializes \tcode{current_} with \tcode{std::move(i.current_)} and \tcode{parent_} with \tcode{i.parent_}. \end{itemdescr} @@ -3369,7 +3453,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return current_;} +\effects +Equivalent to: \tcode{return current_;} \end{itemdescr} \indexlibrary{\idxcode{operator++}!\idxcode{transform_view::iterator}} @@ -3379,7 +3464,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} ++current_; return *this; @@ -3393,7 +3479,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{++current_}. +\effects +Equivalent to \tcode{++current_}. \end{itemdescr} \indexlibrary{\idxcode{operator++}!\idxcode{transform_view::iterator}} @@ -3403,7 +3490,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; ++*this; @@ -3418,7 +3506,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} --current_; return *this; @@ -3432,7 +3521,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; --*this; @@ -3448,7 +3538,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} current_ += n; return *this; @@ -3463,7 +3554,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} current_ -= n; return *this; @@ -3478,7 +3570,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ == y.current_;} +\effects +Equivalent to: \tcode{return x.current_ == y.current_;} \end{itemdescr} \indexlibrary{\idxcode{operator<}!\idxcode{transform_view::iterator}}% @@ -3489,7 +3582,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ < y.current_;} +\effects +Equivalent to: \tcode{return x.current_ < y.current_;} \end{itemdescr} \indexlibrary{\idxcode{operator>}!\idxcode{transform_view::iterator}}% @@ -3500,7 +3594,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return y < x;} +\effects +Equivalent to: \tcode{return y < x;} \end{itemdescr} \indexlibrary{\idxcode{operator<=}!\idxcode{transform_view::iterator}}% @@ -3511,7 +3606,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return !(y < x);} +\effects +Equivalent to: \tcode{return !(y < x);} \end{itemdescr} \indexlibrary{\idxcode{operator>=}!\idxcode{transform_view::iterator}}% @@ -3522,7 +3618,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return !(x < y);} +\effects +Equivalent to: \tcode{return !(x < y);} \end{itemdescr} \indexlibrary{\idxcode{operator<=>}!\idxcode{transform_view::iterator}}% @@ -3534,7 +3631,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ <=> y.current_;} +\effects +Equivalent to: \tcode{return x.current_ <=> y.current_;} \end{itemdescr} \indexlibrary{\idxcode{operator+}!\idxcode{transform_view::iterator}} @@ -3547,7 +3645,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return iterator\{*i.parent_, i.current_ + n\};} +\effects +Equivalent to: \tcode{return iterator\{*i.parent_, i.current_ + n\};} \end{itemdescr} \indexlibrary{\idxcode{operator-}!\idxcode{transform_view::iterator}}% @@ -3558,7 +3657,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return iterator\{*i.parent_, i.current_ - n\};} +\effects +Equivalent to: \tcode{return iterator\{*i.parent_, i.current_ - n\};} \end{itemdescr} \indexlibrary{\idxcode{operator-}!\idxcode{transform_view::iterator}}% @@ -3569,7 +3669,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ - y.current_;} +\effects +Equivalent to: \tcode{return x.current_ - y.current_;} \end{itemdescr} \indexlibrary{\idxcode{iter_swap}!\idxcode{transform_view::iterator}} @@ -3581,7 +3682,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{ranges::iter_swap(x.current_, y.current_)}. +\effects +Equivalent to \tcode{ranges::iter_swap(x.current_, y.current_)}. \end{itemdescr} @@ -3624,7 +3726,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{end_} with \tcode{end}. +\effects +Initializes \tcode{end_} with \tcode{end}. \end{itemdescr} \indexlibrary{\idxcode{sentinel}!\idxcode{transform_view::sentinel}} @@ -3635,7 +3738,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{end_} with \tcode{std::move(i.end_)}. +\effects +Initializes \tcode{end_} with \tcode{std::move(i.end_)}. \end{itemdescr} \indexlibrary{\idxcode{base}!\idxcode{transform_view::sentinel}} @@ -3645,7 +3749,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return end_;} +\effects +Equivalent to: \tcode{return end_;} \end{itemdescr} \indexlibrary{\idxcode{operator==}!\idxcode{transform_view::sentinel}} @@ -3655,7 +3760,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ == y.end_;} +\effects +Equivalent to: \tcode{return x.current_ == y.end_;} \end{itemdescr} \indexlibrary{\idxcode{operator-}!\idxcode{transform_view::sentinel}}% @@ -3667,7 +3773,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ - y.end_;} +\effects +Equivalent to: \tcode{return x.current_ - y.end_;} \end{itemdescr} \indexlibrary{\idxcode{operator-}!\idxcode{transform_view::sentinel}}% @@ -3679,7 +3786,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.end_ - y.current_;} +\effects +Equivalent to: \tcode{return x.end_ - y.current_;} \end{itemdescr} \rSec3[range.transform.adaptor]{\tcode{views::transform}} @@ -3795,7 +3903,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{std::move(base)} and +\effects +Initializes \tcode{base_} with \tcode{std::move(base)} and \tcode{count_} with \tcode{count}. \end{itemdescr} @@ -3808,7 +3917,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} +\effects +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and \tcode{count_} with \tcode{count}. \end{itemdescr} @@ -3819,7 +3929,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return base_;} +\effects +Equivalent to: \tcode{return base_;} \end{itemdescr} \rSec3[range.take.sentinel]{Class template \tcode{take_view::sentinel}} @@ -3853,7 +3964,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{end_} with \tcode{end}. +\effects +Initializes \tcode{end_} with \tcode{end}. \end{itemdescr} \indexlibrary{\idxcode{sentinel}!\idxcode{take_view::sentinel}}% @@ -3864,7 +3976,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{end_} with \tcode{std::move(s.end_)}. +\effects +Initializes \tcode{end_} with \tcode{std::move(s.end_)}. \end{itemdescr} \indexlibrary{\idxcode{base}!\idxcode{take_view::sentinel}} @@ -3874,7 +3987,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return end_;} +\effects +Equivalent to: \tcode{return end_;} \end{itemdescr} \indexlibrary{\idxcode{operator==}!\idxcode{take_view::sentinel}} @@ -3884,7 +3998,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return y.count() == 0 || y.base() == x.end_;} \end{itemdescr} @@ -4400,7 +4515,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{std::move(base)}. +\effects +Initializes \tcode{base_} with \tcode{std::move(base)}. \end{itemdescr} \indexlibrary{\idxcode{join_view}!\idxcode{join_view}}% @@ -4412,7 +4528,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. +\effects +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. \end{itemdescr} \rSec3[range.join.iterator]{Class template \tcode{join_view::iterator}} @@ -4537,7 +4654,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto update_inner = [this](range_reference_t x) -> decltype(auto) { if constexpr (ref_is_glvalue) // \tcode{x} is a reference @@ -4564,7 +4682,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{outer_} with \tcode{outer} and +\effects +Initializes \tcode{outer_} with \tcode{outer} and \tcode{parent_} with \tcode{addressof(parent)}; then calls \tcode{satisfy()}. \end{itemdescr} @@ -4579,7 +4698,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{outer_} with \tcode{std::move(i.outer_)}, +\effects +Initializes \tcode{outer_} with \tcode{std::move(i.outer_)}, \tcode{inner_} with \tcode{std::move(i.inner_)}, and \tcode{parent_} with \tcode{i.parent_}. \end{itemdescr} @@ -4592,7 +4712,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{return inner_;} +\effects +Equivalent to \tcode{return inner_;} \end{itemdescr} \indexlibrary{\idxcode{operator++}!\idxcode{join_view::iterator}} @@ -4609,7 +4730,8 @@ \end{itemize} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto&& inner_rng = @\placeholder{inner-range}@; if (++inner_ == ranges::end(inner_rng)) { @@ -4627,7 +4749,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{++*this}. +\effects +Equivalent to: \tcode{++*this}. \end{itemdescr} \indexlibrary{\idxcode{operator++}!\idxcode{join_view::iterator}} @@ -4639,7 +4762,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; ++*this; @@ -4656,7 +4780,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} if (outer_ == ranges::end(parent_->base_)) inner_ = ranges::end(*--outer_); @@ -4676,7 +4801,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto tmp = *this; --*this; @@ -4693,7 +4819,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return x.outer_ == y.outer_ \&\& x.inner_ == y.inner_;} \end{itemdescr} @@ -4705,7 +4832,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return ranges::iter_swap(x.inner_, y.inner_);} +\effects +Equivalent to: \tcode{return ranges::iter_swap(x.inner_, y.inner_);} \end{itemdescr} \rSec3[range.join.sentinel]{Class template \tcode{join_view::sentinel}} @@ -4739,7 +4867,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{end_} with \tcode{ranges::end(parent.base_)}. +\effects +Initializes \tcode{end_} with \tcode{ranges::end(parent.base_)}. \end{itemdescr} \indexlibrary{\idxcode{sentinel}!\idxcode{join_view::sentinel}} @@ -4750,7 +4879,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{end_} with \tcode{std::move(s.end_)}. +\effects +Initializes \tcode{end_} with \tcode{std::move(s.end_)}. \end{itemdescr} \indexlibrary{\idxcode{operator==}!\idxcode{join_view::sentinel}} @@ -4760,7 +4890,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.outer_ == y.end_;} +\effects +Equivalent to: \tcode{return x.outer_ == y.end_;} \end{itemdescr} \rSec3[range.join.adaptor]{\tcode{views::join}} @@ -4875,7 +5006,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{std::move(base)}, and +\effects +Initializes \tcode{base_} with \tcode{std::move(base)}, and \tcode{pattern_} with \tcode{std::move(pattern)}. \end{itemdescr} @@ -4975,7 +5107,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{parent_} with \tcode{addressof(parent)}. +\effects +Initializes \tcode{parent_} with \tcode{addressof(parent)}. \end{itemdescr} \indexlibrary{\idxcode{outer_iterator}!\idxcode{split_view::outer_iterator}}% @@ -4986,7 +5119,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{parent_} with \tcode{addressof(parent)} +\effects +Initializes \tcode{parent_} with \tcode{addressof(parent)} and \tcode{current_} with \tcode{current}. \end{itemdescr} @@ -4998,7 +5132,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{parent_} with \tcode{i.parent_} and +\effects +Initializes \tcode{parent_} with \tcode{i.parent_} and \tcode{current_} with \tcode{std::move(i.current_)}. \end{itemdescr} @@ -5009,7 +5144,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return value_type\{*this\};} +\effects +Equivalent to: \tcode{return value_type\{*this\};} \end{itemdescr} \indexlibrary{\idxcode{operator++}!\idxcode{split_view::outer_iterator}}% @@ -5019,7 +5155,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} const auto end = ranges::end(parent_->base_); if (@\placeholder{current}@ == end) return *this; @@ -5046,7 +5183,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.current_ == y.current_;} +\effects +Equivalent to: \tcode{return x.current_ == y.current_;} \end{itemdescr} \indexlibrary{\idxcode{operator==}!\idxcode{split_view::outer_iterator}}% @@ -5086,7 +5224,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{i_} with \tcode{i}. +\effects +Initializes \tcode{i_} with \tcode{i}. \end{itemdescr} \indexlibrary{\idxcode{begin}!\idxcode{split_view::outer_iterator::value_type}}% @@ -5096,7 +5235,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return inner_iterator\{i_\};} +\effects +Equivalent to: \tcode{return inner_iterator\{i_\};} \end{itemdescr} \indexlibrary{\idxcode{end}!\idxcode{split_view::outer_iterator::value_type}}% @@ -5106,7 +5246,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return default_sentinel;} +\effects +Equivalent to: \tcode{return default_sentinel;} \end{itemdescr} \rSec3[range.split.inner]{Class template \tcode{split_view::inner_iterator}} @@ -5173,7 +5314,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{i_} with \tcode{i}. +\effects +Initializes \tcode{i_} with \tcode{i}. \end{itemdescr} \indexlibrary{\idxcode{operator++}!\idxcode{split_view::inner_iterator}}% @@ -5183,7 +5325,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} incremented_ = true; if constexpr (!forward_range) { @@ -5204,7 +5347,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return x.i_.current_ == y.i_.current_;} +\effects +Equivalent to: \tcode{return x.i_.current_ == y.i_.current_;} \end{itemdescr} \indexlibrary{\idxcode{operator==}!\idxcode{split_view::inner_iterator}}% @@ -5214,7 +5358,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto cur = x.i_.@\placeholder{current}@; auto end = ranges::end(x.i_.parent_->base_); @@ -5238,7 +5383,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to +\effects +Equivalent to \tcode{ranges::iter_swap(x.i_.\placeholdernc{current}, y.i_.\placeholdernc{current})}. \end{itemdescr} @@ -5382,7 +5528,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{std::move(base)}. +\effects +Initializes \tcode{base_} with \tcode{std::move(base)}. \end{itemdescr} \indexlibrary{\idxcode{common_view}!\idxcode{common_view}}% @@ -5394,7 +5541,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. +\effects +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. \end{itemdescr} \indexlibrary{\idxcode{base}!\idxcode{common_view}}% @@ -5404,7 +5552,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return base_;} +\effects +Equivalent to: \tcode{return base_;} \end{itemdescr} \rSec3[range.common.adaptor]{\tcode{views::common}} @@ -5491,7 +5640,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{std::move(base)}. +\effects +Initializes \tcode{base_} with \tcode{std::move(base)}. \end{itemdescr} \indexlibrary{\idxcode{reverse_view}!\idxcode{reverse_view}}% @@ -5503,7 +5653,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. +\effects +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. \end{itemdescr} \indexlibrary{\idxcode{base}!\idxcode{reverse_view}}% @@ -5513,7 +5664,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return base_;} +\effects +Equivalent to: \tcode{return base_;} \end{itemdescr} \indexlibrary{\idxcode{begin}!\idxcode{reverse_view}}% @@ -5529,7 +5681,8 @@ \end{codeblock} \pnum -\remarks In order to provide the amortized constant time complexity required by +\remarks +In order to provide the amortized constant time complexity required by the \libconcept{range} concept, this function caches the result within the \tcode{reverse_view} for use on subsequent calls. \end{itemdescr} @@ -5543,7 +5696,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return make_reverse_iterator(ranges::end(base_));} +\effects +Equivalent to: \tcode{return make_reverse_iterator(ranges::end(base_));} \end{itemdescr} \indexlibrary{\idxcode{end}!\idxcode{reverse_view}}% @@ -5555,7 +5709,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return make_reverse_iterator(ranges::begin(base_));} +\effects +Equivalent to: \tcode{return make_reverse_iterator(ranges::begin(base_));} \end{itemdescr} \rSec3[range.reverse.adaptor]{\tcode{views::reverse}} @@ -5750,7 +5905,8 @@ \begin{itemdescr} \pnum -\expects \tcode{parent_->stream_ != nullptr} is \tcode{true}. +\expects +\tcode{parent_->stream_ != nullptr} is \tcode{true}. \pnum \effects @@ -6029,7 +6185,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} ++current_; return *this; @@ -6052,7 +6209,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto temp = *this; ++current_; @@ -6203,7 +6361,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return iterator\{x\} += y;} +\effects +Equivalent to: \tcode{return iterator\{x\} += y;} \end{itemdescr} \begin{itemdecl} @@ -6213,7 +6372,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return y + x;} +\effects +Equivalent to: \tcode{return y + x;} \end{itemdescr} \begin{itemdecl} diff --git a/source/regex.tex b/source/regex.tex index 3adb6d7195..1a343d74ae 100644 --- a/source/regex.tex +++ b/source/regex.tex @@ -885,10 +885,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{regex_error}. +\effects +Constructs an object of class \tcode{regex_error}. \pnum -\ensures \tcode{ecode == code()}. +\ensures +\tcode{ecode == code()}. \end{itemdescr} \indexlibrary{\idxcode{error_type}}% @@ -899,7 +901,8 @@ \begin{itemdescr} \pnum -\returns The error code that was passed to the constructor. +\returns +The error code that was passed to the constructor. \end{itemdescr} \rSec1[re.traits]{Class template \tcode{regex_traits}} @@ -963,7 +966,8 @@ \begin{itemdescr} \pnum -\returns \tcode{char_traits::length(p)}. +\returns +\tcode{char_traits::length(p)}. \end{itemdescr} \indexlibrarymember{regex_traits}{translate}% @@ -973,7 +977,8 @@ \begin{itemdescr} \pnum -\returns \tcode{c}. +\returns +\tcode{c}. \end{itemdescr} \indexlibrarymember{regex_traits}{translate_nocase}% @@ -983,7 +988,8 @@ \begin{itemdescr} \pnum -\returns \tcode{use_facet>(getloc()).tolower(c)}. +\returns +\tcode{use_facet>(getloc()).tolower(c)}. \end{itemdescr} \indexlibrarymember{regex_traits}{transform}% @@ -1030,7 +1036,8 @@ \begin{itemdescr} \pnum -\returns A sequence of one or more characters that +\returns +A sequence of one or more characters that represents the collating element consisting of the character sequence designated by the iterator range \range{first}{last}. Returns an empty string if the character sequence is not a @@ -1046,7 +1053,8 @@ \begin{itemdescr} \pnum -\returns An unspecified value that represents +\returns +An unspecified value that represents the character classification named by the character sequence designated by the iterator range \range{first}{last}. If the parameter \tcode{icase} is \tcode{true} then the returned mask identifies the @@ -1060,7 +1068,8 @@ is not recognized then returns \tcode{char_class_type()}. \pnum -\remarks For \tcode{regex_traits}, at least the narrow character names +\remarks +For \tcode{regex_traits}, at least the narrow character names in \tref{re.traits.classnames} shall be recognized. For \tcode{regex_traits}, at least the wide character names in \tref{re.traits.classnames} shall be recognized. @@ -1073,11 +1082,13 @@ \begin{itemdescr} \pnum -\effects Determines if the character \tcode{c} is a member of the character +\effects +Determines if the character \tcode{c} is a member of the character classification represented by \tcode{f}. \pnum -\returns Given the following function declaration: +\returns +Given the following function declaration: \begin{codeblock} // for exposition only template @@ -1134,7 +1145,8 @@ \requires The value of \tcode{radix} shall be 8, 10, or 16. \pnum -\returns The value represented by the digit \tcode{ch} in base +\returns +The value represented by the digit \tcode{ch} in base \tcode{radix} if the character \tcode{ch} is a valid digit in base \tcode{radix}; otherwise returns \tcode{-1}. \end{itemdescr} @@ -1147,18 +1159,21 @@ \begin{itemdescr} \pnum -\effects Imbues \tcode{this} with a copy of the +\effects +Imbues \tcode{this} with a copy of the locale \tcode{loc}. \begin{note} Calling \tcode{imbue} with a different locale than the one currently in use invalidates all cached data held by \tcode{*this}. \end{note} \pnum -\returns If no locale has been previously imbued then a copy of the +\returns +If no locale has been previously imbued then a copy of the global locale in effect at the time of construction of \tcode{*this}, otherwise a copy of the last argument passed to \tcode{imbue}. \pnum -\ensures \tcode{getloc() == loc}. +\ensures +\tcode{getloc() == loc}. \end{itemdescr} \indexlibrary{\idxcode{locale}}% @@ -1169,7 +1184,8 @@ \begin{itemdescr} \pnum -\returns If no locale has been imbued then a copy of the global locale +\returns +If no locale has been imbued then a copy of the global locale in effect at the time of construction of \tcode{*this}, otherwise a copy of the last argument passed to \tcode{imbue}. \end{itemdescr} @@ -1310,7 +1326,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{basic_regex} that +\effects +Constructs an object of class \tcode{basic_regex} that does not match any character sequence. \end{itemdescr} @@ -1324,10 +1341,12 @@ \requires \tcode{p} shall not be a null pointer. \pnum -\throws \tcode{regex_error} if \tcode{p} is not a valid regular expression. +\throws +\tcode{regex_error} if \tcode{p} is not a valid regular expression. \pnum -\effects Constructs an object of class \tcode{basic_regex}; the object's +\effects +Constructs an object of class \tcode{basic_regex}; the object's internal finite state machine is constructed from the regular expression contained in the array of \tcode{charT} of length \tcode{char_traits::\brk{}length(p)} whose first element is @@ -1350,10 +1369,12 @@ \requires \tcode{p} shall not be a null pointer. \pnum -\throws \tcode{regex_error} if \tcode{p} is not a valid regular expression. +\throws +\tcode{regex_error} if \tcode{p} is not a valid regular expression. \pnum -\effects Constructs an object of class \tcode{basic_regex}; the object's +\effects +Constructs an object of class \tcode{basic_regex}; the object's internal finite state machine is constructed from the regular expression contained in the sequence of characters \range{p}{p+len}, and interpreted according the flags specified in \tcode{f}. @@ -1372,7 +1393,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{basic_regex} as a copy of +\effects +Constructs an object of class \tcode{basic_regex} as a copy of the object \tcode{e}. \pnum @@ -1388,10 +1410,12 @@ \begin{itemdescr} \pnum -\effects Move constructs an object of class \tcode{basic_regex} from \tcode{e}. +\effects +Move constructs an object of class \tcode{basic_regex} from \tcode{e}. \pnum -\ensures \tcode{flags()} and \tcode{mark_count()} return the values that +\ensures +\tcode{flags()} and \tcode{mark_count()} return the values that \tcode{e.flags()} and \tcode{e.mark_count()}, respectively, had before construction. \tcode{e} is in a valid state with unspecified value. \end{itemdescr} @@ -1405,10 +1429,12 @@ \begin{itemdescr} \pnum -\throws \tcode{regex_error} if \tcode{s} is not a valid regular expression. +\throws +\tcode{regex_error} if \tcode{s} is not a valid regular expression. \pnum -\effects Constructs an object of class \tcode{basic_regex}; the object's +\effects +Constructs an object of class \tcode{basic_regex}; the object's internal finite state machine is constructed from the regular expression contained in the string \tcode{s}, and interpreted according to the flags specified in \tcode{f}. @@ -1429,11 +1455,13 @@ \begin{itemdescr} \pnum -\throws \tcode{regex_error} if the sequence \range{first}{last} is not a +\throws +\tcode{regex_error} if the sequence \range{first}{last} is not a valid regular expression. \pnum -\effects Constructs an object of class \tcode{basic_regex}; the object's +\effects +Constructs an object of class \tcode{basic_regex}; the object's internal finite state machine is constructed from the regular expression contained in the sequence of characters \range{first}{last}, and interpreted according to the flags specified in \tcode{f}. @@ -1452,7 +1480,8 @@ \begin{itemdescr} \pnum -\effects Same as \tcode{basic_regex(il.begin(), il.end(), f)}. +\effects +Same as \tcode{basic_regex(il.begin(), il.end(), f)}. \end{itemdescr} \rSec2[re.regex.assign]{Assignment} @@ -1464,7 +1493,8 @@ \begin{itemdescr} \pnum -\effects Copies \tcode{e} into \tcode{*this} and returns \tcode{*this}. +\effects +Copies \tcode{e} into \tcode{*this} and returns \tcode{*this}. \pnum \ensures @@ -1479,10 +1509,12 @@ \begin{itemdescr} \pnum -\effects Move assigns from \tcode{e} into \tcode{*this} and returns \tcode{*this}. +\effects +Move assigns from \tcode{e} into \tcode{*this} and returns \tcode{*this}. \pnum -\ensures \tcode{flags()} and \tcode{mark_count()} return the values that +\ensures +\tcode{flags()} and \tcode{mark_count()} return the values that \tcode{e.flags()} and \tcode{e.mark_count()}, respectively, had before assignment. \tcode{e} is in a valid state with unspecified value. \end{itemdescr} @@ -1497,7 +1529,8 @@ \requires \tcode{ptr} shall not be a null pointer. \pnum -\effects Returns \tcode{assign(ptr)}. +\effects +Returns \tcode{assign(ptr)}. \end{itemdescr} \indexlibrarymember{basic_regex}{operator=}% @@ -1507,7 +1540,8 @@ \begin{itemdescr} \pnum -\effects Returns \tcode{assign(il.begin(), il.end())}. +\effects +Returns \tcode{assign(il.begin(), il.end())}. \end{itemdescr} \indexlibrarymember{basic_regex}{operator=}% @@ -1518,7 +1552,8 @@ \begin{itemdescr} \pnum -\effects Returns \tcode{assign(p)}. +\effects +Returns \tcode{assign(p)}. \end{itemdescr} \indexlibrarymember{basic_regex}{assign}% @@ -1528,7 +1563,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *this = that;} +\effects +Equivalent to: \tcode{return *this = that;} \end{itemdescr} \indexlibrarymember{basic_regex}{assign}% @@ -1538,7 +1574,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *this = std::move(that);} +\effects +Equivalent to: \tcode{return *this = std::move(that);} \end{itemdescr} \indexlibrarymember{basic_regex}{assign}% @@ -1548,7 +1585,8 @@ \begin{itemdescr} \pnum -\returns \tcode{assign(string_type(ptr), f)}. +\returns +\tcode{assign(string_type(ptr), f)}. \end{itemdescr} \indexlibrarymember{basic_regex}{assign}% @@ -1558,7 +1596,8 @@ \begin{itemdescr} \pnum -\returns \tcode{assign(string_type(ptr, len), f)}. +\returns +\tcode{assign(string_type(ptr, len), f)}. \end{itemdescr} \indexlibrarymember{basic_regex}{assign}% @@ -1570,13 +1609,16 @@ \begin{itemdescr} \pnum -\throws \tcode{regex_error} if \tcode{s} is not a valid regular expression. +\throws +\tcode{regex_error} if \tcode{s} is not a valid regular expression. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\effects Assigns the regular expression contained in the string +\effects +Assigns the regular expression contained in the string \tcode{s}, interpreted according the flags specified in \tcode{f}. If an exception is thrown, \tcode{*this} is unchanged. @@ -1601,7 +1643,8 @@ \oldconcept{InputIterator} requirements\iref{input.iterators}. \pnum -\returns \tcode{assign(string_type(first, last), f)}. +\returns +\tcode{assign(string_type(first, last), f)}. \end{itemdescr} \indexlibrarymember{assign}{basic_regex}% @@ -1612,10 +1655,12 @@ \begin{itemdescr} \pnum -\effects Same as \tcode{assign(il.begin(), il.end(), f)}. +\effects +Same as \tcode{assign(il.begin(), il.end(), f)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} @@ -1628,7 +1673,8 @@ \begin{itemdescr} \pnum -\effects Returns the number of marked sub-expressions within the +\effects +Returns the number of marked sub-expressions within the regular expression. \end{itemdescr} @@ -1639,7 +1685,8 @@ \begin{itemdescr} \pnum -\effects Returns a copy of the regular expression syntax flags that +\effects +Returns a copy of the regular expression syntax flags that were passed to the object's constructor or to the last call to \tcode{assign}. \end{itemdescr} @@ -1654,7 +1701,8 @@ \begin{itemdescr} \pnum -\effects Returns the result of \tcode{traits_inst.imbue(loc)} where +\effects +Returns the result of \tcode{traits_inst.imbue(loc)} where \tcode{traits_inst} is a (default-initialized) instance of the template type argument \tcode{traits} stored within the object. After a call to \tcode{imbue} the \tcode{basic_regex} object does not match any @@ -1668,7 +1716,8 @@ \begin{itemdescr} \pnum -\effects Returns the result of \tcode{traits_inst.getloc()} where +\effects +Returns the result of \tcode{traits_inst.getloc()} where \tcode{traits_inst} is a (default-initialized) instance of the template parameter \tcode{traits} stored within the object. \end{itemdescr} @@ -1683,15 +1732,18 @@ \begin{itemdescr} \pnum -\effects Swaps the contents of the two regular expressions. +\effects +Swaps the contents of the two regular expressions. \pnum -\ensures \tcode{*this} contains the regular expression +\ensures +\tcode{*this} contains the regular expression that was in \tcode{e}, \tcode{e} contains the regular expression that was in \tcode{*this}. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \rSec2[re.regex.nonmemb]{Non-member functions} @@ -1704,7 +1756,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{lhs.swap(rhs)}. +\effects +Calls \tcode{lhs.swap(rhs)}. \end{itemdescr} \rSec1[re.submatch]{Class template \tcode{sub_match}} @@ -1750,7 +1803,8 @@ \begin{itemdescr} \pnum -\effects Value-initializes the \tcode{pair} base class subobject and the member +\effects +Value-initializes the \tcode{pair} base class subobject and the member \tcode{matched}. \end{itemdescr} @@ -1761,7 +1815,8 @@ \begin{itemdescr} \pnum -\returns \tcode{matched ?\ distance(first, second) :\ 0}. +\returns +\tcode{matched ?\ distance(first, second) :\ 0}. \end{itemdescr} \indexlibrarymember{operator basic_string}{sub_match}% @@ -1771,7 +1826,8 @@ \begin{itemdescr} \pnum -\returns \tcode{matched ?\ string_type(first, second) :\ string_type()}. +\returns +\tcode{matched ?\ string_type(first, second) :\ string_type()}. \end{itemdescr} \indexlibrarymember{sub_match}{str}% @@ -1781,7 +1837,8 @@ \begin{itemdescr} \pnum -\returns \tcode{matched ?\ string_type(first, second) :\ string_type()}. +\returns +\tcode{matched ?\ string_type(first, second) :\ string_type()}. \end{itemdescr} \indexlibrarymember{sub_match}{compare}% @@ -1791,7 +1848,8 @@ \begin{itemdescr} \pnum -\returns \tcode{str().compare(s.str())}. +\returns +\tcode{str().compare(s.str())}. \end{itemdescr} \indexlibrarymember{sub_match}{compare}% @@ -1801,7 +1859,8 @@ \begin{itemdescr} \pnum -\returns \tcode{str().compare(s)}. +\returns +\tcode{str().compare(s)}. \end{itemdescr} \indexlibrarymember{sub_match}{compare}% @@ -1811,7 +1870,8 @@ \begin{itemdescr} \pnum -\returns \tcode{str().compare(s)}. +\returns +\tcode{str().compare(s)}. \end{itemdescr} \rSec2[re.submatch.op]{Non-member operators} @@ -1830,7 +1890,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.compare(rhs) == 0}. +\returns +\tcode{lhs.compare(rhs) == 0}. \end{itemdescr} \indexlibrarymember{sub_match}{operator<=>}% @@ -1841,7 +1902,8 @@ \begin{itemdescr} \pnum -\returns \tcode{static_cast<\placeholdernc{SM-CAT}(BiIter)>(lhs.compare(rhs) <=> 0)}. +\returns +\tcode{static_cast<\placeholdernc{SM-CAT}(BiIter)>(lhs.compare(rhs) <=> 0)}. \end{itemdescr} \indexlibrarymember{operator==}{sub_match}% @@ -1888,7 +1950,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.compare(rhs) == 0}. +\returns +\tcode{lhs.compare(rhs) == 0}. \end{itemdescr} \indexlibrarymember{sub_match}{operator<=>}% @@ -1913,7 +1976,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.compare(typename sub_match::string_type(1, rhs)) == 0}. +\returns +\tcode{lhs.compare(typename sub_match::string_type(1, rhs)) == 0}. \end{itemdescr} \indexlibrarymember{sub_match}{operator<=>}% @@ -1944,7 +2008,8 @@ \begin{itemdescr} \pnum -\returns \tcode{os << m.str()}. +\returns +\tcode{os << m.str()}. \end{itemdescr} \rSec1[re.results]{Class template \tcode{match_results}} @@ -2079,7 +2144,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{match_results}. +\effects +Constructs an object of class \tcode{match_results}. \pnum \ensures @@ -2094,7 +2160,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{match_results}, as a +\effects +Constructs an object of class \tcode{match_results}, as a copy of \tcode{m}. \end{itemdescr} @@ -2105,12 +2172,14 @@ \begin{itemdescr} \pnum -\effects\ Move constructs an object of class \tcode{match_results} from \tcode{m} +\effects +Move constructs an object of class \tcode{match_results} from \tcode{m} satisfying the same postconditions as \tref{re.results.const}. Additionally, the stored \tcode{Allocator} value is move constructed from \tcode{m.get_allocator()}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{match_results}{operator=}% @@ -2120,7 +2189,8 @@ \begin{itemdescr} \pnum -\effects Assigns \tcode{m} to \tcode{*this}. The postconditions of this +\effects +Assigns \tcode{m} to \tcode{*this}. The postconditions of this function are indicated in \tref{re.results.const}. \end{itemdescr} @@ -2131,7 +2201,8 @@ \begin{itemdescr} \pnum -\effects\ Move-assigns \tcode{m} to \tcode{*this}. The postconditions of this function +\effects +Move-assigns \tcode{m} to \tcode{*this}. The postconditions of this function are indicated in \tref{re.results.const}. \end{itemdescr} @@ -2157,7 +2228,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if \tcode{*this} has a fully established result state, otherwise +\returns +\tcode{true} if \tcode{*this} has a fully established result state, otherwise \tcode{false}. \end{itemdescr} @@ -2170,7 +2242,8 @@ \begin{itemdescr} \pnum -\returns One plus the number of marked sub-expressions in the +\returns +One plus the number of marked sub-expressions in the regular expression that was matched if \tcode{*this} represents the result of a successful match. Otherwise returns \tcode{0}. \begin{note} The state of a \tcode{match_results} object can be modified @@ -2187,7 +2260,8 @@ \begin{itemdescr} \pnum -\returns The maximum number of \tcode{sub_match} elements that can be +\returns +The maximum number of \tcode{sub_match} elements that can be stored in \tcode{*this}. \end{itemdescr} @@ -2198,7 +2272,8 @@ \begin{itemdescr} \pnum -\returns \tcode{size() == 0}. +\returns +\tcode{size() == 0}. \end{itemdescr} \rSec2[re.results.acc]{Element access} @@ -2213,7 +2288,8 @@ \requires \tcode{ready() == true}. \pnum -\returns \tcode{(*this)[sub].length()}. +\returns +\tcode{(*this)[sub].length()}. \end{itemdescr} \indexlibrarymember{position}{match_results}% @@ -2226,7 +2302,8 @@ \requires \tcode{ready() == true}. \pnum -\returns The distance from the start of the target sequence +\returns +The distance from the start of the target sequence to \tcode{(*this)[sub].first}. \end{itemdescr} @@ -2240,7 +2317,8 @@ \requires \tcode{ready() == true}. \pnum -\returns \tcode{string_type((*this)[sub])}. +\returns +\tcode{string_type((*this)[sub])}. \end{itemdescr} \indexlibrarymember{match_results}{operator[]}% @@ -2253,7 +2331,8 @@ \requires \tcode{ready() == true}. \pnum -\returns A reference to the \tcode{sub_match} object representing the +\returns +A reference to the \tcode{sub_match} object representing the character sequence that matched marked sub-expression \tcode{n}. If \tcode{n == 0} then returns a reference to a \tcode{sub_match} object representing the character sequence that matched the whole regular expression. If @@ -2271,7 +2350,8 @@ \requires \tcode{ready() == true}. \pnum -\returns A reference to the \tcode{sub_match} object representing the +\returns +A reference to the \tcode{sub_match} object representing the character sequence from the start of the string being matched/searched to the start of the match found. \end{itemdescr} @@ -2286,7 +2366,8 @@ \requires \tcode{ready() == true}. \pnum -\returns A reference to the \tcode{sub_match} object representing the +\returns +A reference to the \tcode{sub_match} object representing the character sequence from the end of the match found to the end of the string being matched/searched. \end{itemdescr} @@ -2299,7 +2380,8 @@ \begin{itemdescr} \pnum -\returns A starting iterator that enumerates over all the +\returns +A starting iterator that enumerates over all the sub-expressions stored in \tcode{*this}. \end{itemdescr} @@ -2311,7 +2393,8 @@ \begin{itemdescr} \pnum -\returns A terminating iterator that enumerates over all the +\returns +A terminating iterator that enumerates over all the sub-expressions stored in \tcode{*this}. \end{itemdescr} @@ -2332,7 +2415,8 @@ \oldconcept{OutputIterator}\iref{output.iterators}. \pnum -\effects Copies the character sequence \range{fmt_first}{fmt_last} to +\effects +Copies the character sequence \range{fmt_first}{fmt_last} to OutputIter \tcode{out}. Replaces each format specifier or escape sequence in the copied range with either the character(s) it represents or the sequence of characters within \tcode{*this} to which it refers. @@ -2340,7 +2424,8 @@ specifiers and escape sequences are recognized. \pnum -\returns \tcode{out}. +\returns +\tcode{out}. \end{itemdescr} \indexlibrarymember{match_results}{format}% @@ -2354,7 +2439,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return format(out, fmt.data(), fmt.data() + fmt.size(), flags); \end{codeblock} @@ -2382,7 +2468,8 @@ \end{codeblock} \pnum -\returns \tcode{result}. +\returns +\tcode{result}. \end{itemdescr} \indexlibrarymember{match_results}{format}% @@ -2397,14 +2484,16 @@ \requires \tcode{ready() == true}. \pnum -\effects Constructs an empty string \tcode{result} of type \tcode{string_type} and +\effects +Constructs an empty string \tcode{result} of type \tcode{string_type} and calls: \begin{codeblock} format(back_inserter(result), fmt, fmt + char_traits::length(fmt), flags); \end{codeblock} \pnum -\returns \tcode{result}. +\returns +\tcode{result}. \end{itemdescr} \rSec2[re.results.all]{Allocator}% @@ -2416,7 +2505,8 @@ \begin{itemdescr} \pnum -\returns A copy of the Allocator that was passed to the object's constructor or, if that +\returns +A copy of the Allocator that was passed to the object's constructor or, if that allocator has been replaced, a copy of the most recent replacement. \end{itemdescr} @@ -2429,15 +2519,18 @@ \begin{itemdescr} \pnum -\effects Swaps the contents of the two sequences. +\effects +Swaps the contents of the two sequences. \pnum -\ensures \tcode{*this} contains the sequence of matched +\ensures +\tcode{*this} contains the sequence of matched sub-expressions that were in \tcode{that}, \tcode{that} contains the sequence of matched sub-expressions that were in \tcode{*this}. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \indexlibrarymember{match_results}{swap}% @@ -2448,7 +2541,8 @@ \end{itemdecl} \pnum -\effects As if by \tcode{m1.swap(m2)}. +\effects +As if by \tcode{m1.swap(m2)}. \rSec2[re.results.nonmember]{Non-member functions} @@ -2512,7 +2606,8 @@ \oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators}. \pnum -\effects Determines whether there is a match between the +\effects +Determines whether there is a match between the regular expression \tcode{e}, and all of the character sequence \range{first}{last}. The parameter \tcode{flags} is used to control how the expression is matched against the character @@ -2617,7 +2712,8 @@ \begin{itemdescr} \pnum -\effects Behaves ``as if'' by constructing an instance of +\effects +Behaves ``as if'' by constructing an instance of \tcode{match_results what}, and then returning the result of \tcode{regex_match(first, last, what, e, flags)}. @@ -2634,7 +2730,8 @@ \begin{itemdescr} \pnum -\returns \tcode{regex_match(str, str + char_traits::length(str), m, e, flags)}. +\returns +\tcode{regex_match(str, str + char_traits::length(str), m, e, flags)}. \end{itemdescr} \indexlibrary{\idxcode{regex_match}}% @@ -2649,7 +2746,8 @@ \begin{itemdescr} \pnum -\returns \tcode{regex_match(s.begin(), s.end(), m, e, flags)}. +\returns +\tcode{regex_match(s.begin(), s.end(), m, e, flags)}. \end{itemdescr} \indexlibrary{\idxcode{regex_match}}% @@ -2662,7 +2760,8 @@ \begin{itemdescr} \pnum -\returns \tcode{regex_match(str, str + char_traits::length(str), e, flags)} +\returns +\tcode{regex_match(str, str + char_traits::length(str), e, flags)} \end{itemdescr} \indexlibrary{\idxcode{regex_match}}% @@ -2675,7 +2774,8 @@ \begin{itemdescr} \pnum -\returns \tcode{regex_match(s.begin(), s.end(), e, flags)}. +\returns +\tcode{regex_match(s.begin(), s.end(), e, flags)}. \end{itemdescr} \rSec2[re.alg.search]{\tcode{regex_search}} @@ -2696,7 +2796,8 @@ \oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators}. \pnum -\effects Determines whether there is some sub-sequence within \range{first}{last} that matches +\effects +Determines whether there is some sub-sequence within \range{first}{last} that matches the regular expression \tcode{e}. The parameter \tcode{flags} is used to control how the expression is matched against the character sequence. Returns \tcode{true} if such a sequence exists, \tcode{false} otherwise. @@ -2786,7 +2887,8 @@ \begin{itemdescr} \pnum -\returns \tcode{regex_search(str, str + char_traits::length(str), m, e, flags)}. +\returns +\tcode{regex_search(str, str + char_traits::length(str), m, e, flags)}. \end{itemdescr} \indexlibrary{\idxcode{regex_search}}% @@ -2801,7 +2903,8 @@ \begin{itemdescr} \pnum -\returns \tcode{regex_search(s.begin(), s.end(), m, e, flags)}. +\returns +\tcode{regex_search(s.begin(), s.end(), m, e, flags)}. \end{itemdescr} \indexlibrary{\idxcode{regex_search}}% @@ -2814,7 +2917,8 @@ \begin{itemdescr} \pnum -\effects Behaves ``as if'' by constructing an object \tcode{what} +\effects +Behaves ``as if'' by constructing an object \tcode{what} of type \tcode{match_results} and returning \tcode{regex_search(first, last, what, e, flags)}. \end{itemdescr} @@ -2829,7 +2933,8 @@ \begin{itemdescr} \pnum -\returns \tcode{regex_search(str, str + char_traits::length(str), e, flags)}. +\returns +\tcode{regex_search(str, str + char_traits::length(str), e, flags)}. \end{itemdescr} \indexlibrary{\idxcode{regex_search}}% @@ -2842,7 +2947,8 @@ \begin{itemdescr} \pnum -\returns \tcode{regex_search(s.begin(), s.end(), e, flags)}. +\returns +\tcode{regex_search(s.begin(), s.end(), e, flags)}. \end{itemdescr} \rSec2[re.alg.replace]{\tcode{regex_replace}} @@ -2914,7 +3020,8 @@ is nonzero, then only the first match found is replaced. \pnum -\returns \tcode{out}. +\returns +\tcode{out}. \end{itemdescr} \indexlibrary{\idxcode{regex_replace}}% @@ -2935,14 +3042,16 @@ \begin{itemdescr} \pnum -\effects Constructs an empty string \tcode{result} of +\effects +Constructs an empty string \tcode{result} of type \tcode{basic_string} and calls: \begin{codeblock} regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, flags); \end{codeblock} \pnum -\returns \tcode{result}. +\returns +\tcode{result}. \end{itemdescr} \indexlibrary{\idxcode{regex_replace}}% @@ -2963,14 +3072,16 @@ \begin{itemdescr} \pnum -\effects Constructs an empty string \tcode{result} of +\effects +Constructs an empty string \tcode{result} of type \tcode{basic_string} and calls: \begin{codeblock} regex_replace(back_inserter(result), s, s + char_traits::length(s), e, fmt, flags); \end{codeblock} \pnum -\returns \tcode{result}. +\returns +\tcode{result}. \end{itemdescr} \rSec1[re.iter]{Regular expression iterators} @@ -3059,7 +3170,8 @@ \begin{itemdescr} \pnum -\effects Constructs an end-of-sequence iterator. +\effects +Constructs an end-of-sequence iterator. \end{itemdescr} \indexlibrary{\idxcode{regex_iterator}!constructor}% @@ -3071,7 +3183,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{begin} and \tcode{end} to +\effects +Initializes \tcode{begin} and \tcode{end} to \tcode{a} and \tcode{b}, respectively, sets \tcode{pregex} to \tcode{addressof(re)}, sets \tcode{flags} to \tcode{m}, then calls \tcode{regex_search(begin, end, match, *pregex, flags)}. If this @@ -3088,7 +3201,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if \tcode{*this} and \tcode{right} are both end-of-sequence +\returns +\tcode{true} if \tcode{*this} and \tcode{right} are both end-of-sequence iterators or if the following conditions all hold: \begin{itemize} \item \tcode{begin == right.begin}, @@ -3109,7 +3223,8 @@ \begin{itemdescr} \pnum -\returns \tcode{match}. +\returns +\tcode{match}. \end{itemdescr} \indexlibrarymember{operator->}{regex_iterator}% @@ -3119,7 +3234,8 @@ \begin{itemdescr} \pnum -\returns \tcode{addressof(match)}. +\returns +\tcode{addressof(match)}. \end{itemdescr} \rSec3[re.regiter.incr]{Increment} @@ -3132,7 +3248,8 @@ \begin{itemdescr} \pnum -\effects Constructs a local variable \tcode{start} of type \tcode{BidirectionalIterator} and +\effects +Constructs a local variable \tcode{start} of type \tcode{BidirectionalIterator} and initializes it with the value of \tcode{match[0].second}. \pnum @@ -3364,7 +3481,8 @@ \begin{itemdescr} \pnum -\effects Constructs the end-of-sequence iterator. +\effects +Constructs the end-of-sequence iterator. \end{itemdescr} \indexlibrary{\idxcode{regex_token_iterator}!constructor}% @@ -3397,7 +3515,8 @@ \tcode{>= -1}. \pnum -\effects The first constructor initializes the member \tcode{subs} to hold the single +\effects +The first constructor initializes the member \tcode{subs} to hold the single value \tcode{submatch}. The second, third, and fourth constructors initialize the member \tcode{subs} to hold a copy of the sequence of integer values @@ -3423,7 +3542,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if \tcode{*this} and \tcode{right} are both end-of-sequence iterators, +\returns +\tcode{true} if \tcode{*this} and \tcode{right} are both end-of-sequence iterators, or if \tcode{*this} and \tcode{right} are both suffix iterators and \tcode{suffix == right.suffix}; otherwise returns \tcode{false} if \tcode{*this} or \tcode{right} is an end-of-sequence iterator or a suffix iterator. Otherwise returns \tcode{true} if \tcode{position == right.position}, @@ -3439,7 +3559,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*result}. +\returns +\tcode{*result}. \end{itemdescr} @@ -3450,7 +3571,8 @@ \begin{itemdescr} \pnum -\returns \tcode{result}. +\returns +\tcode{result}. \end{itemdescr} @@ -3463,7 +3585,8 @@ \begin{itemdescr} \pnum -\effects Constructs a local variable \tcode{prev} of +\effects +Constructs a local variable \tcode{prev} of type \tcode{position_iterator}, initialized with the value of \tcode{position}. @@ -3490,7 +3613,8 @@ Otherwise, sets \tcode{*this} to an end-of-sequence iterator. \pnum -\returns \tcode{*this} +\returns +\tcode{*this} \end{itemdescr} \indexlibrarymember{regex_token_iterator}{operator++}% @@ -3500,10 +3624,12 @@ \begin{itemdescr} \pnum -\effects Constructs a copy \tcode{tmp} of \tcode{*this}, then calls \tcode{++(*this)}. +\effects +Constructs a copy \tcode{tmp} of \tcode{*this}, then calls \tcode{++(*this)}. \pnum -\returns \tcode{tmp}. +\returns +\tcode{tmp}. \end{itemdescr} \rSec1[re.grammar]{Modified ECMAScript regular expression grammar} diff --git a/source/strings.tex b/source/strings.tex index 50a65f70aa..27a35aa073 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -130,25 +130,32 @@ \tcode{X::state_type} & & (described in~\ref{char.traits.typedefs}) & compile-time \\ \rowsep \tcode{X::eq(c,d)} & \tcode{bool} & -\returns whether \tcode{c} is to be treated as equal to \tcode{d}. & constant \\ \rowsep +\returns +whether \tcode{c} is to be treated as equal to \tcode{d}. & constant \\ \rowsep \tcode{X::lt(c,d)} & \tcode{bool} & -\returns whether \tcode{c} is to be treated as less than \tcode{d}. & constant \\ \rowsep +\returns +whether \tcode{c} is to be treated as less than \tcode{d}. & constant \\ \rowsep \tcode{X::compare(p,q,n)} & \tcode{int} & -\returns \tcode{0} if for each \tcode{i} in \tcode{[0,n)}, \tcode{X::eq(p[i],q[i])} +\returns +\tcode{0} if for each \tcode{i} in \tcode{[0,n)}, \tcode{X::eq(p[i],q[i])} is \tcode{true}; else, a negative value if, for some \tcode{j} in \tcode{[0,n)}, \tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \tcode{[0,j)} \tcode{X::eq(p[i],q[i])} is \tcode{true}; else a positive value. & linear \\ \rowsep \tcode{X::length(p)} & \tcode{size_t} & -\returns the smallest \tcode{i} such that \tcode{X::eq(p[i],charT())} is \tcode{true}. & linear \\ \rowsep +\returns +the smallest \tcode{i} such that \tcode{X::eq(p[i],charT())} is \tcode{true}. & linear \\ \rowsep \tcode{X::find(p,n,c)} & \tcode{const X::char_type*} & -\returns the smallest \tcode{q} in \tcode{[p,p+n)} such that +\returns +the smallest \tcode{q} in \tcode{[p,p+n)} such that \tcode{X::eq(*q,c)} is \tcode{true}, zero otherwise. & linear \\ \rowsep \tcode{X::move(s,p,n)} & \tcode{X::char_type*} & for each \tcode{i} in \tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}. Copies correctly even where the ranges \tcode{[p,p+n)} and \tcode{[s,s+n)} overlap.\br \returns \tcode{s}. & linear \\ \rowsep \tcode{X::copy(s,p,n)} & \tcode{X::char_type*} & -\expects \tcode{p} not in \tcode{[s,s+n)}. \br -\returns \tcode{s}.\br +\expects +\tcode{p} not in \tcode{[s,s+n)}. \br +\returns +\tcode{s}.\br for each \tcode{i} in \tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep \tcode{X::assign(r,d)} & (not used) & @@ -156,25 +163,31 @@ \tcode{X::assign\-(s,n,c)} & \tcode{X::char_type*} & for each \tcode{i} in \tcode{[0,n)}, performs \tcode{X::assign(s[i],c)}.\br -\returns \tcode{s}. & linear \\ \rowsep +\returns +\tcode{s}. & linear \\ \rowsep \tcode{X::not_eof(e)} & \tcode{int_type} & -\returns \tcode{e} if \tcode{X::eq_int_type(e,X::eof())} is \tcode{false}, +\returns +\tcode{e} if \tcode{X::eq_int_type(e,X::eof())} is \tcode{false}, otherwise a value \tcode{f} such that \tcode{X::eq_int_type(f,X::eof())} is \tcode{false}. & constant \\ \rowsep \tcode{X::to_char_type\-(e)} & \tcode{X::char_type} & -\returns if for some \tcode{c}, \tcode{X::eq_int_type(e,X::to_int_type(c))} +\returns +if for some \tcode{c}, \tcode{X::eq_int_type(e,X::to_int_type(c))} is \tcode{true}, \tcode{c}; else some unspecified value. & constant \\ \rowsep \tcode{X::to_int_type\-(c)} & \tcode{X::int_type} & -\returns some value \tcode{e}, constrained by the definitions of +\returns +some value \tcode{e}, constrained by the definitions of \tcode{to_char_type} and \tcode{eq_int_type}. & constant \\ \rowsep \tcode{X::eq_int_type\-(e,f)} & \tcode{bool} & -\returns for all \tcode{c} and \tcode{d}, \tcode{X::eq(c,d)} is equal to +\returns +for all \tcode{c} and \tcode{d}, \tcode{X::eq(c,d)} is equal to \tcode{X::eq_int_type(X::to_int_type(c), X::to_int_type(d))}; otherwise, yields \tcode{true} if \tcode{e} and \tcode{f} are both copies of \tcode{X::eof()}; otherwise, yields \tcode{false} if one of \tcode{e} and \tcode{f} is a copy of \tcode{X::eof()} and the other is not; otherwise the value is unspecified. & constant \\ \rowsep \tcode{X::eof()} & \tcode{X::int_type} & -\returns a value \tcode{e} such that \tcode{X::eq_int_type(e,X::to_int_type(c))} +\returns +a value \tcode{e} such that \tcode{X::eq_int_type(e,X::to_int_type(c))} is \tcode{false} for all values \tcode{c}. & constant \\ \end{libreqtab4d} @@ -1172,7 +1185,8 @@ is \tcode{true}. \pnum -\effects Creates a variable, \tcode{sv}, +\effects +Creates a variable, \tcode{sv}, as if by \tcode{basic_string_view sv = t;} and then behaves the same as: \begin{codeblock} @@ -1199,7 +1213,8 @@ \end{itemize} \pnum -\effects Creates a variable, \tcode{sv}, as if by +\effects +Creates a variable, \tcode{sv}, as if by \tcode{basic_string_view sv = t;} and then behaves the same as \tcode{basic_string(sv.data(), sv.size(), a)}. \end{itemdescr} @@ -1211,7 +1226,8 @@ \begin{itemdescr} \pnum -\expects \range{s}{s + n} is a valid range. +\expects +\range{s}{s + n} is a valid range. \pnum \effects @@ -1238,7 +1254,8 @@ \end{note} \pnum -\effects Equivalent to: \tcode{basic_string(s, traits::length(s), a)}. +\effects +Equivalent to: \tcode{basic_string(s, traits::length(s), a)}. \end{itemdescr} \indexlibrary{\idxcode{basic_string}!constructor}% @@ -1285,7 +1302,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{basic_string(il.begin(), il.end(), a)}. +\effects +Equivalent to \tcode{basic_string(il.begin(), il.end(), a)}. \end{itemdescr} \indexlibrary{\idxcode{basic_string}!constructor}% @@ -1296,13 +1314,15 @@ \begin{itemdescr} \pnum -\effects Constructs an object whose value is +\effects +Constructs an object whose value is that of \tcode{str} prior to this call. The stored allocator is constructed from \tcode{alloc}. In the second form, \tcode{str} is left in a valid but unspecified state. \pnum -\throws The second form throws nothing if \tcode{alloc == str.get_allocator()}. +\throws +The second form throws nothing if \tcode{alloc == str.get_allocator()}. \end{itemdescr} \begin{itemdecl} @@ -1395,7 +1415,8 @@ \end{itemize} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} basic_string_view sv = t; return assign(sv); @@ -1409,7 +1430,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return *this = basic_string_view(s);} \end{itemdescr} @@ -1420,7 +1442,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return *this = basic_string_view(addressof(c), 1); \end{codeblock} @@ -1433,7 +1456,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return *this = basic_string_view(il.begin(), il.size()); \end{codeblock} @@ -1514,7 +1538,8 @@ A count of the number of char-like objects currently in the string. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \indexlibrarymember{max_size}{basic_string}% @@ -1529,7 +1554,8 @@ \tcode{basic_string}. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \indexlibrarymember{resize}{basic_string}% @@ -1578,7 +1604,8 @@ The size of the allocated storage in the string. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \indexlibrarymember{reserve}{basic_string}% @@ -1618,19 +1645,22 @@ \begin{itemdescr} \pnum -\effects \tcode{shrink_to_fit} is a non-binding request to reduce +\effects +\tcode{shrink_to_fit} is a non-binding request to reduce \tcode{capacity()} to \tcode{size()}. \begin{note} The request is non-binding to allow latitude for implementation-specific optimizations. \end{note} It does not increase \tcode{capacity()}, but may reduce \tcode{capacity()} by causing reallocation. \pnum -\complexity If the size is not equal to the old capacity, +\complexity +If the size is not equal to the old capacity, linear in the size of the sequence; otherwise constant. \pnum -\remarks Reallocation invalidates all the references, pointers, and iterators +\remarks +Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence, as well as the past-the-end iterator. \begin{note} If no reallocation happens, they remain valid. \end{note} \end{itemdescr} @@ -1653,7 +1683,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return size() == 0;} \end{itemdescr} @@ -1667,19 +1698,23 @@ \begin{itemdescr} \pnum -\expects \tcode{pos <= size()}. +\expects +\tcode{pos <= size()}. \pnum -\returns \tcode{*(begin() + pos)} if \tcode{pos < size()}. Otherwise, +\returns +\tcode{*(begin() + pos)} if \tcode{pos < size()}. Otherwise, returns a reference to an object of type \tcode{charT} with value \tcode{charT()}, where modifying the object to any value other than \tcode{charT()} leads to undefined behavior. \pnum -\throws Nothing. +\throws +Nothing. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \indexlibrarymember{at}{basic_string}% @@ -1743,7 +1778,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return append(str);} +\effects +Equivalent to: \tcode{return append(str);} \end{itemdescr} @@ -1782,7 +1818,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return append(s);} +\effects +Equivalent to: \tcode{return append(s);} \end{itemdescr} \indexlibrarymember{operator+=}{basic_string}% @@ -1792,7 +1829,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return append(size_type\{1\}, c);} +\effects +Equivalent to: \tcode{return append(size_type\{1\}, c);} \end{itemdescr} \indexlibrarymember{operator+=}{basic_string}% @@ -1802,7 +1840,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return append(il);} +\effects +Equivalent to: \tcode{return append(il);} \end{itemdescr} @@ -1815,7 +1854,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return append(str.data(), str.size());} +\effects +Equivalent to: \tcode{return append(str.data(), str.size());} \end{itemdescr} \indexlibrarymember{append}{basic_string}% @@ -1893,10 +1933,12 @@ \begin{itemdescr} \pnum -\expects \range{s}{s + n} is a valid range. +\expects +\range{s}{s + n} is a valid range. \pnum -\effects Appends a copy of the range \range{s}{s + n} to the string. +\effects +Appends a copy of the range \range{s}{s + n} to the string. \pnum \returns @@ -1910,7 +1952,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return append(s, traits::length(s));} +\effects +Equivalent to: \tcode{return append(s, traits::length(s));} \end{itemdescr} \indexlibrarymember{append}{basic_string}% @@ -1920,10 +1963,12 @@ \begin{itemdescr} \pnum -\effects Appends \tcode{n} copies of \tcode{c} to the string. +\effects +Appends \tcode{n} copies of \tcode{c} to the string. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{append}{basic_string}% @@ -1939,7 +1984,8 @@ iterator\iref{container.requirements.general}. \pnum -\effects Equivalent to: \tcode{return append(basic_string(first, last, get_allocator()));} +\effects +Equivalent to: \tcode{return append(basic_string(first, last, get_allocator()));} \end{itemdescr} \indexlibrarymember{append}{basic_string}% @@ -1949,7 +1995,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return append(il.begin(), il.size());} +\effects +Equivalent to: \tcode{return append(il.begin(), il.size());} \end{itemdescr} \indexlibrarymember{push_back}{basic_string}% @@ -1973,7 +2020,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *this = str;} +\effects +Equivalent to: \tcode{return *this = str;} \end{itemdescr} \indexlibrarymember{assign}{basic_string}% @@ -1985,7 +2033,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return *this = std::move(str);} +\effects +Equivalent to: \tcode{return *this = std::move(str);} \end{itemdescr} @@ -2049,7 +2098,8 @@ \end{itemize} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} basic_string_view sv = t; return assign(sv.substr(pos, n)); @@ -2063,7 +2113,8 @@ \begin{itemdescr} \pnum -\expects \range{s}{s + n} is a valid range. +\expects +\range{s}{s + n} is a valid range. \pnum \effects @@ -2082,7 +2133,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return assign(s, traits::length(s));} +\effects +Equivalent to: \tcode{return assign(s, traits::length(s));} \end{itemdescr} \indexlibrarymember{assign}{basic_string}% @@ -2092,7 +2144,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return assign(il.begin(), il.size());} +\effects +Equivalent to: \tcode{return assign(il.begin(), il.size());} \end{itemdescr} \indexlibrarymember{assign}{basic_string}% @@ -2102,7 +2155,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} clear(); resize(n, c); @@ -2123,7 +2177,8 @@ iterator\iref{container.requirements.general}. \pnum -\effects Equivalent to: \tcode{return assign(basic_string(first, last, get_allocator()));} +\effects +Equivalent to: \tcode{return assign(basic_string(first, last, get_allocator()));} \end{itemdescr} \rSec4[string.insert]{\tcode{basic_string::insert}} @@ -2135,7 +2190,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return insert(pos, str.data(), str.size());} +\effects +Equivalent to: \tcode{return insert(pos, str.data(), str.size());} \end{itemdescr} \indexlibrarymember{insert}{basic_string}% @@ -2200,7 +2256,8 @@ \end{itemize} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} basic_string_view sv = t; return insert(pos1, sv.substr(pos2, n)); @@ -2214,7 +2271,8 @@ \begin{itemdescr} \pnum -\expects \range{s}{s + n} is a valid range. +\expects +\range{s}{s + n} is a valid range. \pnum \throws @@ -2225,7 +2283,8 @@ \end{itemize} \pnum -\effects Inserts a copy of the range \range{s}{s + n} +\effects +Inserts a copy of the range \range{s}{s + n} immediately before the character at position \tcode{pos} if \tcode{pos < size()}, or otherwise at the end of the string. @@ -2241,7 +2300,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return insert(pos, s, traits::length(s));} +\effects +Equivalent to: \tcode{return insert(pos, s, traits::length(s));} \end{itemdescr} \indexlibrarymember{insert}{basic_string}% @@ -2305,7 +2365,8 @@ Inserts \tcode{n} copies of \tcode{c} at the position \tcode{p}. \pnum -\returns An iterator which refers to the first inserted character, or +\returns +An iterator which refers to the first inserted character, or \tcode{p} if \tcode{n == 0}. \end{itemdescr} @@ -2332,7 +2393,8 @@ \tcode{insert(p - begin(), basic_string(first, last, get_allocator()))}. \pnum -\returns An iterator which refers to the first inserted character, or +\returns +An iterator which refers to the first inserted character, or \tcode{p} if \tcode{first == last}. \end{itemdescr} @@ -2343,7 +2405,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return insert(p, il.begin(), il.end());} +\effects +Equivalent to: \tcode{return insert(p, il.begin(), il.end());} \end{itemdescr} \rSec4[string.erase]{\tcode{basic_string::erase}} @@ -2383,7 +2446,8 @@ \tcode{p} is a valid dereferenceable iterator on \tcode{*this}. \pnum -\throws Nothing. +\throws +Nothing. \pnum \effects @@ -2410,7 +2474,8 @@ \tcode{*this}. \range{first}{last} is a valid range. \pnum -\throws Nothing. +\throws +Nothing. \pnum \effects @@ -2437,7 +2502,8 @@ \tcode{!empty()}. \pnum -\throws Nothing. +\throws +Nothing. \pnum \effects @@ -2453,7 +2519,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return replace(pos1, n1, str.data(), str.size());} +\effects +Equivalent to: \tcode{return replace(pos1, n1, str.data(), str.size());} \end{itemdescr} \indexlibrarymember{replace}{basic_string}% @@ -2533,7 +2600,8 @@ \begin{itemdescr} \pnum -\expects \range{s}{s + n2} is a valid range. +\expects +\range{s}{s + n2} is a valid range. \pnum \throws @@ -2545,7 +2613,8 @@ \end{itemize} \pnum -\effects Determines the effective length \tcode{xlen} of the string to be +\effects +Determines the effective length \tcode{xlen} of the string to be removed as the smaller of \tcode{n1} and \tcode{size() - pos1}. If \tcode{size() - xlen >= max_size() - n2} throws \tcode{length_error}. Otherwise, the function replaces the characters in the range @@ -2564,7 +2633,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return replace(pos, n, s, traits::length(s));} +\effects +Equivalent to: \tcode{return replace(pos, n, s, traits::length(s));} \end{itemdescr} \indexlibrarymember{replace}{basic_string}% @@ -2583,7 +2653,8 @@ \end{itemize} \pnum -\effects Determines the effective length \tcode{xlen} of the string to be +\effects +Determines the effective length \tcode{xlen} of the string to be removed as the smaller of \tcode{n1} and \tcode{size() - pos1}. If \tcode{size() - xlen >=} \tcode{max_size() - n2} throws \tcode{length_error}. Otherwise, the function replaces the characters in the range @@ -2591,7 +2662,8 @@ with \tcode{n2} copies of \tcode{c}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{replace}{basic_string}% @@ -2665,7 +2737,8 @@ \begin{itemdescr} \pnum -\expects \range{begin()}{i1} and \range{i1}{i2} are valid ranges. +\expects +\range{begin()}{i1} and \range{i1}{i2} are valid ranges. \pnum \effects @@ -2740,10 +2813,12 @@ \tcode{*this}. \pnum -\throws Nothing. +\throws +Nothing. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \rSec3[string.ops]{String operations} @@ -2759,11 +2834,13 @@ \begin{itemdescr} \pnum -\returns A pointer \tcode{p} such that \tcode{p + i == addressof(operator[](i))} for each +\returns +A pointer \tcode{p} such that \tcode{p + i == addressof(operator[](i))} for each \tcode{i} in \crange{0}{size()}. \pnum -\complexity Constant time. +\complexity +Constant time. \pnum \remarks @@ -2777,11 +2854,13 @@ \begin{itemdescr} \pnum -\returns A pointer \tcode{p} such that \tcode{p + i == addressof(operator[](i))} for each +\returns +A pointer \tcode{p} such that \tcode{p + i == addressof(operator[](i))} for each \tcode{i} in \crange{0}{size()}. \pnum -\complexity Constant time. +\complexity +Constant time. \pnum \remarks @@ -2796,7 +2875,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return basic_string_view(data(), size());} \end{itemdescr} @@ -3051,7 +3131,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return compare(pos1, n1, basic_string_view(str), pos2, n2); \end{codeblock} @@ -3064,7 +3145,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return compare(basic_string_view(s));} \end{itemdescr} @@ -3327,7 +3409,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\effects Let \tcode{\placeholder{op}} be the operator. +\effects +Let \tcode{\placeholder{op}} be the operator. Equivalent to: \begin{codeblock} return basic_string_view(lhs) @\placeholder{op}@ basic_string_view(rhs); @@ -3555,7 +3638,8 @@ \begin{itemdescr} \pnum -\effects The first two functions call \tcode{strtol(str.c_str(), ptr, base)}, +\effects +The first two functions call \tcode{strtol(str.c_str(), ptr, base)}, and the last three functions call \tcode{strtoul(str.c_str(), ptr, base)}, \tcode{strtoll(str.c_str(), ptr, base)}, and \tcode{strtoull(\brk{}str.c_str(), ptr, base)}, respectively. Each function returns the converted result, if any. The @@ -3565,10 +3649,12 @@ the index of the first unconverted element of \tcode{str}. \pnum -\returns The converted result. +\returns +The converted result. \pnum -\throws \tcode{invalid_argument} if \tcode{strtol}, \tcode{strtoul}, +\throws +\tcode{invalid_argument} if \tcode{strtol}, \tcode{strtoul}, \tcode{strtoll}, or \tcode{strtoull} reports that no conversion could be performed. Throws \tcode{out_of_range} if \tcode{strtol}, \tcode{strtoul}, \tcode{strtoll} or \tcode{strtoull} sets \tcode{errno} to \tcode{ERANGE}, @@ -3587,7 +3673,8 @@ \begin{itemdescr} \pnum -\effects These functions call +\effects +These functions call \tcode{strtof(str.c_str(), ptr)}, \tcode{strtod(str.c_str(), ptr)}, and \tcode{strtold(\brk{}str.c_str(), ptr)}, respectively. Each function returns the converted result, if any. The argument \tcode{ptr} designates a pointer to @@ -3597,10 +3684,12 @@ of \tcode{str}. \pnum -\returns The converted result. +\returns +The converted result. \pnum -\throws \tcode{invalid_argument} if \tcode{strtof}, \tcode{strtod}, or +\throws +\tcode{invalid_argument} if \tcode{strtof}, \tcode{strtod}, or \tcode{strtold} reports that no conversion could be performed. Throws \tcode{out_of_range} if \tcode{strtof}, \tcode{strtod}, or \tcode{strtold} sets \tcode{errno} to \tcode{ERANGE} @@ -3623,7 +3712,8 @@ \begin{itemdescr} \pnum -\returns Each function returns a \tcode{string} object holding the character +\returns +Each function returns a \tcode{string} object holding the character representation of the value of its argument that would be generated by calling \tcode{sprintf(buf, fmt, val)} with a format specifier of \tcode{"\%d"}, @@ -3652,7 +3742,8 @@ \begin{itemdescr} \pnum -\effects The first two functions call \tcode{wcstol(str.c_str(), ptr, base)}, +\effects +The first two functions call \tcode{wcstol(str.c_str(), ptr, base)}, and the last three functions call \tcode{wcstoul(str.c_str(), ptr, base)}, \tcode{wcstoll(str.c_str(), ptr, base)}, and \tcode{wcstoull(\brk{}str.c_str(), ptr, base)}, respectively. Each function returns the converted result, if any. The @@ -3662,10 +3753,12 @@ the index of the first unconverted element of \tcode{str}. \pnum -\returns The converted result. +\returns +The converted result. \pnum -\throws \tcode{invalid_argument} if \tcode{wcstol}, \tcode{wcstoul}, \tcode{wcstoll}, or +\throws +\tcode{invalid_argument} if \tcode{wcstol}, \tcode{wcstoul}, \tcode{wcstoll}, or \tcode{wcstoull} reports that no conversion could be performed. Throws \tcode{out_of_range} if the converted value is outside the range of representable values for the return type. @@ -3682,7 +3775,8 @@ \begin{itemdescr} \pnum -\effects These functions call \tcode{wcstof(str.c_str(), ptr)}, +\effects +These functions call \tcode{wcstof(str.c_str(), ptr)}, \tcode{wcstod(str.c_str(), ptr)}, and \tcode{wcstold(\brk{}str.c_str(), ptr)}, respectively. Each function returns the converted result, if any. The argument \tcode{ptr} designates a pointer to an object internal to @@ -3691,10 +3785,12 @@ the index of the first unconverted element of \tcode{str}. \pnum -\returns The converted result. +\returns +The converted result. \pnum -\throws \tcode{invalid_argument} if \tcode{wcstof}, \tcode{wcstod}, or \tcode{wcstold} reports that no +\throws +\tcode{invalid_argument} if \tcode{wcstof}, \tcode{wcstod}, or \tcode{wcstold} reports that no conversion could be performed. Throws \tcode{out_of_range} if \tcode{wcstof}, \tcode{wcstod}, or \tcode{wcstold} sets \tcode{errno} to \tcode{ERANGE}. \end{itemdescr} @@ -3714,7 +3810,8 @@ \begin{itemdescr} \pnum -\returns Each function returns a \tcode{wstring} object holding the character +\returns +Each function returns a \tcode{wstring} object holding the character representation of the value of its argument that would be generated by calling \tcode{swprintf(buf, buffsz, fmt, val)} with a format specifier of \tcode{L"\%d"}, diff --git a/source/support.tex b/source/support.tex index 997e9cc1d7..cc91b98e71 100644 --- a/source/support.tex +++ b/source/support.tex @@ -349,7 +349,8 @@ \constraints \tcode{is_integral_v} is \tcode{true}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return b = b << shift;} \end{itemdescr} @@ -364,7 +365,8 @@ \constraints \tcode{is_integral_v} is \tcode{true}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return static_cast(static_cast( static_cast(b) << shift)); @@ -382,7 +384,8 @@ \constraints \tcode{is_integral_v} is \tcode{true}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return b >> shift;} \end{itemdescr} @@ -397,7 +400,8 @@ \constraints \tcode{is_integral_v} is \tcode{true}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return static_cast(static_cast( static_cast(b) >> shift)); @@ -411,7 +415,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return l = l | r;} +\effects +Equivalent to: \tcode{return l = l | r;} \end{itemdescr} \indexlibrarymember{operator"|}{byte}% @@ -421,7 +426,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return static_cast(static_cast(static_cast(l) | static_cast(r))); @@ -435,7 +441,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return l = l \& r;} +\effects +Equivalent to: \tcode{return l = l \& r;} \end{itemdescr} \indexlibrarymember{operator\&}{byte}% @@ -445,7 +452,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return static_cast(static_cast(static_cast(l) & static_cast(r))); @@ -459,7 +467,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return l = l \caret{} r;} +\effects +Equivalent to: \tcode{return l = l \caret{} r;} \end{itemdescr} \indexlibrarymember{operator\caret}{byte}% @@ -469,7 +478,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return static_cast(static_cast(static_cast(l) ^ static_cast(r))); @@ -483,7 +493,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return static_cast(static_cast( ~static_cast(b))); @@ -501,7 +512,8 @@ \constraints \tcode{is_integral_v} is \tcode{true}. \pnum -\effects Equivalent to: \tcode{return static_cast(b);} +\effects +Equivalent to: \tcode{return static_cast(b);} \end{itemdescr} \rSec1[support.limits]{Implementation properties} @@ -2007,7 +2019,8 @@ \begin{itemdescr} \pnum -\effects The \tcode{at_quick_exit()} functions register the function pointed to by \tcode{f} +\effects +The \tcode{at_quick_exit()} functions register the function pointed to by \tcode{f} to be called without arguments when \tcode{quick_exit} is called. It is unspecified whether a call to \tcode{at_quick_exit()} that does not happen before\iref{intro.multithread} all calls to \tcode{quick_exit} will succeed. \begin{note} The @@ -2027,7 +2040,8 @@ The implementation shall support the registration of at least 32 functions. \pnum -\returns Zero if the registration succeeds, nonzero if it fails. +\returns +Zero if the registration succeeds, nonzero if it fails. \end{itemdescr} \indexlibrary{\idxcode{quick_exit}}% @@ -2037,7 +2051,8 @@ \begin{itemdescr} \pnum -\effects Functions registered by calls to \tcode{at_quick_exit} are called in the +\effects +Functions registered by calls to \tcode{at_quick_exit} are called in the reverse order of their registration, except that a function shall be called after any previously registered functions that had already been called at the time it was registered. Objects shall not be destroyed as a result of calling \tcode{quick_exit}. @@ -2893,7 +2908,8 @@ \begin{itemdescr} \pnum -\returns The current \tcode{new_handler}. +\returns +The current \tcode{new_handler}. \begin{note} This may be a null pointer value. \end{note} \end{itemdescr} @@ -3104,12 +3120,14 @@ \begin{itemdescr} \pnum -\returns An unspecified value, except that within a single execution of the +\returns +An unspecified value, except that within a single execution of the program, it shall return the same value for any two \tcode{type_info} objects which compare equal. \pnum -\remarks An implementation should return different values for two +\remarks +An implementation should return different values for two \tcode{type_info} objects which do not compare equal. \end{itemdescr} @@ -3377,7 +3395,8 @@ \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{line_}. +\returns +\tcode{line_}. \end{itemdescr} \begin{itemdecl} @@ -3491,7 +3510,8 @@ \begin{itemdescr} \pnum -\ensures If \tcode{*this} and \tcode{rhs} both have dynamic type \tcode{exception} +\ensures +If \tcode{*this} and \tcode{rhs} both have dynamic type \tcode{exception} then the value of the expression \tcode{strcmp(what(), rhs.what())} shall equal 0. \end{itemdescr} @@ -3604,7 +3624,8 @@ handler function for terminating exception processing. \pnum -\remarks It is unspecified whether a null pointer value designates the default +\remarks +It is unspecified whether a null pointer value designates the default \tcode{terminate_handler}. \pnum @@ -3621,7 +3642,8 @@ \begin{itemdescr} \pnum -\returns The current \tcode{terminate_handler}. +\returns +The current \tcode{terminate_handler}. \begin{note} This may be a null pointer value. \end{note} \end{itemdescr} @@ -3718,7 +3740,8 @@ \begin{itemdescr} \pnum -\returns An \tcode{exception_ptr} object that refers to +\returns +An \tcode{exception_ptr} object that refers to the currently handled exception\iref{except.handle} or a copy of the currently handled exception, or a null \tcode{exception_ptr} object if no exception is being handled. The referenced object shall remain valid at least as long as there is an @@ -3744,10 +3767,12 @@ \begin{itemdescr} \pnum -\expects \tcode{p} is not a null pointer. +\expects +\tcode{p} is not a null pointer. \pnum -\throws The exception object to which \tcode{p} refers. +\throws +The exception object to which \tcode{p} refers. \end{itemdescr} \indexlibrary{\idxcode{make_exception_ptr}}% @@ -3757,7 +3782,8 @@ \begin{itemdescr} \pnum -\effects Creates an \tcode{exception_ptr} object that refers to a copy of \tcode{e}, as if: +\effects +Creates an \tcode{exception_ptr} object that refers to a copy of \tcode{e}, as if: \begin{codeblock} try { throw e; @@ -3810,7 +3836,8 @@ \begin{itemdescr} \pnum -\effects The constructor calls \tcode{current_exception()} and stores the returned value. +\effects +The constructor calls \tcode{current_exception()} and stores the returned value. \end{itemdescr} \indexlibrarymember{rethrow_nested}{nested_exception}% @@ -3820,7 +3847,8 @@ \begin{itemdescr} \pnum -\effects If \tcode{nested_ptr()} returns a null pointer, the function calls the function \tcode{std::terminate}. +\effects +If \tcode{nested_ptr()} returns a null pointer, the function calls the function \tcode{std::terminate}. Otherwise, it throws the stored exception captured by \tcode{*this}. \end{itemdescr} @@ -3831,7 +3859,8 @@ \begin{itemdescr} \pnum -\returns The stored exception captured by this \tcode{nested_exception} object. +\returns +The stored exception captured by this \tcode{nested_exception} object. \end{itemdescr} \indexlibrarymember{throw_with_nested}{nested_exception}% @@ -3844,7 +3873,8 @@ Let \tcode{U} be \tcode{decay_t}. \pnum -\expects \tcode{U} meets the \oldconcept{CopyConstructible} requirements. +\expects +\tcode{U} meets the \oldconcept{CopyConstructible} requirements. \pnum \throws @@ -3934,7 +3964,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{size() == 0}. +\ensures +\tcode{size() == 0}. \end{itemdescr} \rSec2[support.initlist.access]{Initializer list access} @@ -3946,7 +3977,8 @@ \begin{itemdescr} \pnum -\returns A pointer to the beginning of the array. If \tcode{size() == 0} the +\returns +A pointer to the beginning of the array. If \tcode{size() == 0} the values of \tcode{begin()} and \tcode{end()} are unspecified but they shall be identical. \end{itemdescr} @@ -3958,7 +3990,8 @@ \begin{itemdescr} \pnum -\returns \tcode{begin() + size()}. +\returns +\tcode{begin() + size()}. \end{itemdescr} \indexlibrarymember{size}{initializer_list}% @@ -3968,10 +4001,12 @@ \begin{itemdescr} \pnum -\returns The number of elements in the array. +\returns +The number of elements in the array. \pnum -\complexity Constant time. +\complexity +Constant time. \end{itemdescr} \rSec2[support.initlist.range]{Initializer list range access} @@ -3983,7 +4018,8 @@ \begin{itemdescr} \pnum -\returns \tcode{il.begin()}. +\returns +\tcode{il.begin()}. \end{itemdescr} \indexlibrary{\idxcode{end(initializer_list)}}% @@ -3993,7 +4029,8 @@ \begin{itemdescr} \pnum -\returns \tcode{il.end()}. +\returns +\tcode{il.end()}. \end{itemdescr} \rSec1[cmp]{Comparisons} @@ -5297,7 +5334,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{address() == nullptr}. +\ensures +\tcode{address() == nullptr}. \end{itemdescr} \indexlibrarymember{from_promise}{coroutine_handle}% @@ -5310,10 +5348,12 @@ \requires \tcode{p} is a reference to a promise object of a coroutine. \pnum -\returns A coroutine handle \tcode{h} referring to the coroutine. +\returns +A coroutine handle \tcode{h} referring to the coroutine. \pnum -\ensures \tcode{addressof(h.promise()) == addressof(p)}. +\ensures +\tcode{addressof(h.promise()) == addressof(p)}. \end{itemdescr} \indexlibrarymember{operator=}{coroutine_handle}% @@ -5323,10 +5363,12 @@ \begin{itemdescr} \pnum -\ensures \tcode{address() == nullptr}. +\ensures +\tcode{address() == nullptr}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec3[coroutine.handle.export.import]{Export/import} @@ -5338,7 +5380,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ptr}. +\returns +\tcode{ptr}. \end{itemdescr} \indexlibrarymember{from_address}{coroutine_handle}% @@ -5352,7 +5395,8 @@ \requires \tcode{addr} was obtained via a prior call to \tcode{address}. \pnum -\ensures \tcode{from_address(address()) == *this}. +\ensures +\tcode{from_address(address()) == *this}. \end{itemdescr} \rSec3[coroutine.handle.observers]{Observers} @@ -5364,7 +5408,8 @@ \begin{itemdescr} \pnum -\returns \tcode{address() != nullptr}. +\returns +\tcode{address() != nullptr}. \end{itemdescr} \indexlibrarymember{done}{coroutine_handle}% @@ -5377,7 +5422,8 @@ \requires \tcode{*this} refers to a suspended coroutine. \pnum -\returns \tcode{true} if the coroutine is suspended at its +\returns +\tcode{true} if the coroutine is suspended at its final suspend point, otherwise \tcode{false}. \end{itemdescr} @@ -5411,7 +5457,8 @@ \requires \tcode{*this} refers to a suspended coroutine. \pnum -\effects Resumes the execution of the coroutine. If the coroutine +\effects +Resumes the execution of the coroutine. If the coroutine was suspended at its final suspend point, behavior is undefined. \end{itemdescr} @@ -5425,7 +5472,8 @@ \requires \tcode{*this} refers to a suspended coroutine. \pnum -\effects Destroys the coroutine\iref{dcl.fct.def.coroutine}. +\effects +Destroys the coroutine\iref{dcl.fct.def.coroutine}. \end{itemdescr} \rSec3[coroutine.handle.promise]{Promise access} @@ -5440,7 +5488,8 @@ \requires \tcode{*this} refers to a coroutine. \pnum -\returns A reference to the promise of the coroutine. +\returns +A reference to the promise of the coroutine. \end{itemdescr} \rSec3[coroutine.handle.compare]{Comparison operators} @@ -5453,7 +5502,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.address() == y.address()}. +\returns +\tcode{x.address() == y.address()}. \end{itemdescr} \indexlibrarymember{operator<=>}{coroutine_handle}% @@ -5463,7 +5513,8 @@ \begin{itemdescr} \pnum -\returns \tcode{compare_three_way()(x.address(), y.address())}. +\returns +\tcode{compare_three_way()(x.address(), y.address())}. \end{itemdescr} \rSec3[coroutine.handle.hash]{Hash support} @@ -5531,7 +5582,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true}. +\returns +\tcode{true}. \end{itemdescr} \indexlibrarymember{done}{coroutine_handle}% @@ -5541,7 +5593,8 @@ \begin{itemdescr} \pnum -\returns \tcode{false}. +\returns +\tcode{false}. \end{itemdescr} \rSec4[coroutine.handle.noop.resumption]{Resumption} @@ -5557,7 +5610,8 @@ \begin{itemdescr} \pnum -\effects None. +\effects +None. \pnum \remarks @@ -5575,7 +5629,8 @@ \begin{itemdescr} \pnum -\returns A reference to the promise object associated with this +\returns +A reference to the promise object associated with this coroutine handle. \end{itemdescr} @@ -5588,10 +5643,12 @@ \begin{itemdescr} \pnum -\returns \tcode{ptr}. +\returns +\tcode{ptr}. \pnum -\remarks A \tcode{noop_coroutine_handle}'s \tcode{ptr} is always a +\remarks +A \tcode{noop_coroutine_handle}'s \tcode{ptr} is always a non-null pointer value. \end{itemdescr} @@ -5604,11 +5661,13 @@ \begin{itemdescr} \pnum -\returns A handle to a coroutine that has no observable effects +\returns +A handle to a coroutine that has no observable effects when resumed or destroyed. \pnum -\remarks A handle returned from \tcode{noop_coroutine} may or may not +\remarks +A handle returned from \tcode{noop_coroutine} may or may not compare equal to a handle returned from another invocation of \tcode{noop_coroutine}. \end{itemdescr} diff --git a/source/threads.tex b/source/threads.tex index 22b15a5fed..d66ff5f42f 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -186,7 +186,8 @@ \begin{itemdescr} \pnum -\effects Blocks until a lock can be acquired for the current execution agent. If an exception +\effects +Blocks until a lock can be acquired for the current execution agent. If an exception is thrown then a lock shall not have been acquired for the current execution agent. \end{itemdescr} @@ -199,10 +200,12 @@ \requires The current execution agent shall hold a lock on \tcode{m}. \pnum -\effects Releases a lock on \tcode{m} held by the current execution agent. +\effects +Releases a lock on \tcode{m} held by the current execution agent. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \rSec3[thread.req.lockable.req]{\oldconcept{Lockable} requirements} @@ -218,14 +221,16 @@ \begin{itemdescr} \pnum -\effects Attempts to acquire a lock for the current execution agent without blocking. If an +\effects +Attempts to acquire a lock for the current execution agent without blocking. If an exception is thrown then a lock shall not have been acquired for the current execution agent. \pnum \returntype \tcode{bool}. \pnum -\returns \tcode{true} if the lock was acquired, \tcode{false} otherwise. +\returns +\tcode{true} if the lock was acquired, \tcode{false} otherwise. \end{itemdescr} \rSec3[thread.req.lockable.timed]{\oldconcept{TimedLockable} requirements} @@ -243,7 +248,8 @@ \begin{itemdescr} \pnum -\effects Attempts to acquire a lock for the current execution agent within the relative +\effects +Attempts to acquire a lock for the current execution agent within the relative timeout\iref{thread.req.timing} specified by \tcode{rel_time}. The function shall not return within the timeout specified by \tcode{rel_time} unless it has obtained a lock on \tcode{m} for the current execution agent. If an exception is thrown then a lock shall not have been @@ -253,7 +259,8 @@ \returntype \tcode{bool}. \pnum -\returns \tcode{true} if the lock was acquired, \tcode{false} otherwise. +\returns +\tcode{true} if the lock was acquired, \tcode{false} otherwise. \end{itemdescr} \begin{itemdecl} @@ -262,7 +269,8 @@ \begin{itemdescr} \pnum -\effects Attempts to acquire a lock for the current execution agent before the absolute +\effects +Attempts to acquire a lock for the current execution agent before the absolute timeout\iref{thread.req.timing} specified by \tcode{abs_time}. The function shall not return before the timeout specified by \tcode{abs_time} unless it has obtained a lock on \tcode{m} for the current execution agent. If an exception is thrown then a lock shall not have been acquired @@ -272,7 +280,8 @@ \returntype \tcode{bool}. \pnum -\returns \tcode{true} if the lock was acquired, \tcode{false} otherwise. +\returns +\tcode{true} if the lock was acquired, \tcode{false} otherwise. \end{itemdescr} \rSec1[thread.stoptoken]{Stop tokens} @@ -410,7 +419,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{*this == rhs} is \tcode{true}. +\ensures +\tcode{*this == rhs} is \tcode{true}. \begin{note} \tcode{*this} and \tcode{rhs} share the ownership of the same stop state, if any. @@ -436,7 +446,8 @@ \begin{itemdescr} \pnum -\effects Releases ownership of the stop state, if any. +\effects +Releases ownership of the stop state, if any. \end{itemdescr} \indexlibrarymember{operator=}{stop_token}% @@ -446,10 +457,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{stop_token(rhs).swap(*this)}. +\effects +Equivalent to: \tcode{stop_token(rhs).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{stop_token}% @@ -459,10 +472,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{stop_token(std::move(rhs)).swap(*this)}. +\effects +Equivalent to: \tcode{stop_token(std::move(rhs)).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{stop_token}% @@ -472,7 +487,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the values of \tcode{*this} and \tcode{rhs}. +\effects +Exchanges the values of \tcode{*this} and \tcode{rhs}. \end{itemdescr} \rSec3[stoptoken.mem]{Members} @@ -484,7 +500,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if \tcode{*this} has ownership of a stop state +\returns +\tcode{true} if \tcode{*this} has ownership of a stop state that has received a stop request; otherwise, \tcode{false}. \end{itemdescr} @@ -496,7 +513,8 @@ \begin{itemdescr} \pnum -\returns \tcode{false} if: +\returns +\tcode{false} if: \begin{itemize} \item \tcode{*this} does not have ownership of a stop state, or \item a stop request was not made @@ -527,7 +545,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(lhs==rhs)}. +\returns +\tcode{!(lhs==rhs)}. \end{itemdescr} \rSec3[stoptoken.special]{Specialized algorithms} @@ -539,7 +558,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{x.swap(y)}. +\effects +Equivalent to: \tcode{x.swap(y)}. \end{itemdescr} \indexlibrary{\idxcode{stop_source}}% @@ -601,14 +621,17 @@ \begin{itemdescr} \pnum -\effects Initialises \tcode{*this} to have ownership of a new stop state. +\effects +Initialises \tcode{*this} to have ownership of a new stop state. \pnum -\ensures \tcode{stop_possible()} is \tcode{true} +\ensures +\tcode{stop_possible()} is \tcode{true} and \tcode{stop_requested()} is \tcode{false}. \pnum -\throws \tcode{bad_alloc} if memory could not be allocated for the stop state. +\throws +\tcode{bad_alloc} if memory could not be allocated for the stop state. \end{itemdescr} \indexlibrary{\idxcode{stop_source}!constructor}% @@ -631,7 +654,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{*this == rhs} is \tcode{true}. +\ensures +\tcode{*this == rhs} is \tcode{true}. \begin{note} \tcode{*this} and \tcode{rhs} share the ownership of the same stop state, if any. @@ -658,7 +682,8 @@ \begin{itemdescr} \pnum -\effects Releases ownership of the stop state, if any. +\effects +Releases ownership of the stop state, if any. \end{itemdescr} \indexlibrarymember{operator=}{stop_source}% @@ -668,10 +693,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{stop_source(rhs).swap(*this)}. +\effects +Equivalent to: \tcode{stop_source(rhs).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{stop_source}% @@ -681,10 +708,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{stop_source(std::move(rhs)).swap(*this)}. +\effects +Equivalent to: \tcode{stop_source(std::move(rhs)).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{stop_source}% @@ -694,7 +723,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the values of \tcode{*this} and \tcode{rhs}. +\effects +Exchanges the values of \tcode{*this} and \tcode{rhs}. \end{itemdescr} \rSec3[stopsource.mem]{Members} @@ -798,7 +828,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(lhs==rhs)}. +\returns +\tcode{!(lhs==rhs)}. \end{itemdescr} \rSec3[stopsource.special]{Specialized algorithms} @@ -810,7 +841,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{x.swap(y)}. +\effects +Equivalent to: \tcode{x.swap(y)}. \end{itemdescr} \indexlibrary{\idxcode{stop_callback}}% @@ -904,7 +936,8 @@ then \tcode{terminate} is called\iref{except.terminate}. \pnum -\throws Any exception thrown by the initialization of \tcode{callback}. +\throws +Any exception thrown by the initialization of \tcode{callback}. \end{itemdescr} \indexlibrary{\idxcode{stop_callback}!destructor}% @@ -1055,10 +1088,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{id}. +\effects +Constructs an object of type \tcode{id}. \pnum -\ensures The constructed object does not represent a thread of execution. +\ensures +The constructed object does not represent a thread of execution. \end{itemdescr} \indexlibrarymember{operator==}{thread::id}% @@ -1068,7 +1103,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} only if \tcode{x} and \tcode{y} represent the same +\returns +\tcode{true} only if \tcode{x} and \tcode{y} represent the same thread of execution or neither \tcode{x} nor \tcode{y} represents a thread of execution. \end{itemdescr} @@ -1101,14 +1137,16 @@ \begin{itemdescr} \pnum -\effects Inserts an unspecified text representation of \tcode{id} into +\effects +Inserts an unspecified text representation of \tcode{id} into \tcode{out}. For two objects of type \tcode{thread::id} \tcode{x} and \tcode{y}, if \tcode{x == y} the \tcode{thread::id} objects have the same text representation and if \tcode{x != y} the \tcode{thread::id} objects have distinct text representations. \pnum -\returns \tcode{out}. +\returns +\tcode{out}. \end{itemdescr} \indexlibrary{\idxcode{hash}!\idxcode{thread::id}}% @@ -1130,10 +1168,12 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{thread} object that does not represent a thread of execution. +\effects +Constructs a \tcode{thread} object that does not represent a thread of execution. \pnum -\ensures \tcode{get_id() == id()}. +\ensures +\tcode{get_id() == id()}. \end{itemdescr} \indexlibrary{\idxcode{thread}!constructor}% @@ -1157,7 +1197,8 @@ is the same type as \tcode{std::thread}. \pnum -\effects\ Constructs an object of type \tcode{thread}. The new thread of execution executes +\effects +Constructs an object of type \tcode{thread}. The new thread of execution executes \tcode{% \placeholdernc{INVOKE}(\brk{}% \placeholdernc{decay-copy}(\brk{}% @@ -1178,14 +1219,17 @@ \pnum -\sync The completion of the invocation of the constructor +\sync +The completion of the invocation of the constructor synchronizes with the beginning of the invocation of the copy of \tcode{f}. \pnum -\ensures \tcode{get_id() != id()}. \tcode{*this} represents the newly started thread. +\ensures +\tcode{get_id() != id()}. \tcode{*this} represents the newly started thread. \pnum -\throws \tcode{system_error} if unable to start the new thread. +\throws +\tcode{system_error} if unable to start the new thread. \pnum \errors @@ -1203,11 +1247,13 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{thread} from \tcode{x}, and sets +\effects +Constructs an object of type \tcode{thread} from \tcode{x}, and sets \tcode{x} to a default constructed state. \pnum -\ensures \tcode{x.get_id() == id()} and \tcode{get_id()} returns the +\ensures +\tcode{x.get_id() == id()} and \tcode{get_id()} returns the value of \tcode{x.get_id()} prior to the start of construction. \end{itemdescr} @@ -1238,15 +1284,18 @@ \begin{itemdescr} \pnum -\effects If \tcode{joinable()}, calls \tcode{terminate()}. Otherwise, assigns the +\effects +If \tcode{joinable()}, calls \tcode{terminate()}. Otherwise, assigns the state of \tcode{x} to \tcode{*this} and sets \tcode{x} to a default constructed state. \pnum -\ensures \tcode{x.get_id() == id()} and \tcode{get_id()} returns the value of +\ensures +\tcode{x.get_id() == id()} and \tcode{get_id()} returns the value of \tcode{x.get_id()} prior to the assignment. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec3[thread.thread.member]{Members} @@ -1258,7 +1307,8 @@ \begin{itemdescr} \pnum -\effects Swaps the state of \tcode{*this} and \tcode{x}. +\effects +Swaps the state of \tcode{*this} and \tcode{x}. \end{itemdescr} \indexlibrarymember{joinable}{thread}% @@ -1268,7 +1318,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get_id() != id()}. +\returns +\tcode{get_id() != id()}. \end{itemdescr} \indexlibrarymember{join}{thread}% @@ -1278,19 +1329,23 @@ \begin{itemdescr} \pnum -\effects\ Blocks until the thread represented by \tcode{*this} has completed. +\effects +Blocks until the thread represented by \tcode{*this} has completed. \pnum -\sync The completion of the thread represented by \tcode{*this} synchronizes with\iref{intro.multithread} +\sync +The completion of the thread represented by \tcode{*this} synchronizes with\iref{intro.multithread} the corresponding successful \tcode{join()} return. \begin{note} Operations on \tcode{*this} are not synchronized. \end{note} \pnum -\ensures The thread represented by \tcode{*this} has completed. \tcode{get_id() == id()}. +\ensures +The thread represented by \tcode{*this} has completed. \tcode{get_id() == id()}. \pnum -\throws \tcode{system_error} when +\throws +\tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -1312,16 +1367,19 @@ \begin{itemdescr} \pnum -\effects The thread represented by \tcode{*this} continues execution without the calling thread +\effects +The thread represented by \tcode{*this} continues execution without the calling thread blocking. When \tcode{detach()} returns, \tcode{*this} no longer represents the possibly continuing thread of execution. When the thread previously represented by \tcode{*this} ends execution, the implementation shall release any owned resources. \pnum -\ensures \tcode{get_id() == id()}. +\ensures +\tcode{get_id() == id()}. \pnum -\throws \tcode{system_error} when +\throws +\tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -1339,7 +1397,8 @@ \begin{itemdescr} \pnum -\returns A default constructed \tcode{id} object if \tcode{*this} does not represent a thread, +\returns +A default constructed \tcode{id} object if \tcode{*this} does not represent a thread, otherwise \tcode{this_thread::get_id()} for the thread of execution represented by \tcode{*this}. \end{itemdescr} @@ -1353,7 +1412,8 @@ \begin{itemdescr} \pnum -\returns The number of hardware thread contexts. \begin{note} This value should +\returns +The number of hardware thread contexts. \begin{note} This value should only be considered to be a hint. \end{note} If this value is not computable or well-defined, an implementation should return 0. \end{itemdescr} @@ -1367,7 +1427,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec2[thread.jthread.class]{Class \tcode{jthread}} @@ -1492,7 +1553,8 @@ \tcode{terminate} is called. \pnum -\sync The completion of the invocation of the constructor +\sync +The completion of the invocation of the constructor synchronizes with the beginning of the invocation of the copy of \tcode{f}. \pnum @@ -1506,7 +1568,8 @@ \end{note} \pnum -\throws \tcode{system_error} if unable to start the new thread. +\throws +\tcode{system_error} if unable to start the new thread. \pnum \errors @@ -1525,7 +1588,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{jthread} from \tcode{x}, and sets +\effects +Constructs an object of type \tcode{jthread} from \tcode{x}, and sets \tcode{x} to a default constructed state. \pnum @@ -1574,7 +1638,8 @@ and \tcode{x.ssource.stop_possible()} is \tcode{false}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec3[thread.jthread.mem]{Members} @@ -1586,7 +1651,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the values of \tcode{*this} and \tcode{x}. +\effects +Exchanges the values of \tcode{*this} and \tcode{x}. \end{itemdescr} @@ -1597,7 +1663,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get_id() != id()}. +\returns +\tcode{get_id() != id()}. \end{itemdescr} \indexlibrarymember{join}{jthread}% @@ -1607,16 +1674,19 @@ \begin{itemdescr} \pnum -\effects Blocks until the thread represented by \tcode{*this} has completed. +\effects +Blocks until the thread represented by \tcode{*this} has completed. \pnum -\sync The completion of the thread represented by \tcode{*this} +\sync +The completion of the thread represented by \tcode{*this} synchronizes with\iref{intro.multithread} the corresponding successful \tcode{join()} return. \begin{note} Operations on \tcode{*this} are not synchronized. \end{note} \pnum -\ensures The thread represented by \tcode{*this} has completed. +\ensures +The thread represented by \tcode{*this} has completed. \tcode{get_id() == id()}. \pnum @@ -1651,7 +1721,8 @@ the implementation shall release any owned resources. \pnum -\ensures \tcode{get_id() == id()}. +\ensures +\tcode{get_id() == id()}. \pnum \throws @@ -1688,7 +1759,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return ssource;} +\effects +Equivalent to: \tcode{return ssource;} \end{itemdescr} \indexlibrarymember{get_stop_token}{jthread}% @@ -1698,7 +1770,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return ssource.get_token();} +\effects +Equivalent to: \tcode{return ssource.get_token();} \end{itemdescr} \indexlibrarymember{request_stop}{jthread}% @@ -1708,7 +1781,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return ssource.request_stop();} +\effects +Equivalent to: \tcode{return ssource.request_stop();} \end{itemdescr} @@ -1721,7 +1795,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{x.swap(y)}. +\effects +Equivalent to: \tcode{x.swap(y)}. \end{itemdescr} \rSec3[thread.jthread.static]{Static members} @@ -1733,7 +1808,8 @@ \begin{itemdescr} \pnum -\returns \tcode{thread::hardware_concurrency()}. +\returns +\tcode{thread::hardware_concurrency()}. \end{itemdescr} @@ -1758,7 +1834,8 @@ \begin{itemdescr} \pnum -\returns An object of type \tcode{thread::id} that uniquely identifies the current thread of +\returns +An object of type \tcode{thread::id} that uniquely identifies the current thread of execution. No other thread of execution shall have this id and this thread of execution shall always have this id. The object returned shall not compare equal to a default constructed \tcode{thread::id}. @@ -1771,10 +1848,12 @@ \begin{itemdescr} \pnum -\effects Offers the implementation the opportunity to reschedule. +\effects +Offers the implementation the opportunity to reschedule. \pnum -\sync None. +\sync +None. \end{itemdescr} \indexlibrarymember{sleep_until}{this_thread}% @@ -1785,14 +1864,17 @@ \begin{itemdescr} \pnum -\effects Blocks the calling thread for the absolute timeout\iref{thread.req.timing} specified +\effects +Blocks the calling thread for the absolute timeout\iref{thread.req.timing} specified by \tcode{abs_time}. \pnum -\sync None. +\sync +None. \pnum -\throws Timeout-related exceptions\iref{thread.req.timing}. +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} \indexlibrarymember{sleep_for}{this_thread}% @@ -1803,14 +1885,17 @@ \begin{itemdescr} \pnum -\effects Blocks the calling thread for the relative timeout\iref{thread.req.timing} specified +\effects +Blocks the calling thread for the relative timeout\iref{thread.req.timing} specified by \tcode{rel_time}. \pnum -\sync None. +\sync +None. \pnum -\throws Timeout-related exceptions\iref{thread.req.timing}. +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} \rSec1[thread.mutex]{Mutual exclusion} @@ -1930,20 +2015,24 @@ thread does not own the mutex. \pnum -\effects Blocks the calling thread until ownership of the mutex can be obtained for the calling thread. +\effects +Blocks the calling thread until ownership of the mutex can be obtained for the calling thread. \pnum -\ensures The calling thread owns the mutex. +\ensures +The calling thread owns the mutex. \pnum \returntype \tcode{void}. \pnum -\sync Prior \tcode{unlock()} operations on the same object shall +\sync +Prior \tcode{unlock()} operations on the same object shall \term{synchronize with}\iref{intro.multithread} this operation. \pnum -\throws \tcode{system_error} when +\throws +\tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -1967,7 +2056,8 @@ thread does not own the mutex. \pnum -\effects Attempts to obtain ownership of the mutex for the calling thread without +\effects +Attempts to obtain ownership of the mutex for the calling thread without blocking. If ownership is not obtained, there is no effect and \tcode{try_lock()} immediately returns. An implementation may fail to obtain the lock even if it is not held by any other thread. \begin{note} This spurious failure is normally uncommon, but @@ -1981,18 +2071,21 @@ \returntype \tcode{bool}. \pnum -\returns \tcode{true} if ownership of the mutex was obtained for the calling +\returns +\tcode{true} if ownership of the mutex was obtained for the calling thread, otherwise \tcode{false}. \pnum -\sync If \tcode{try_lock()} returns \tcode{true}, prior \tcode{unlock()} operations +\sync +If \tcode{try_lock()} returns \tcode{true}, prior \tcode{unlock()} operations on the same object \term{synchronize with}\iref{intro.multithread} this operation. \begin{note} Since \tcode{lock()} does not synchronize with a failed subsequent \tcode{try_lock()}, the visibility rules are weak enough that little would be known about the state after a failure, even in the absence of spurious failures. \end{note} \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \pnum @@ -2003,17 +2096,20 @@ \requires The calling thread shall own the mutex. \pnum -\effects Releases the calling thread's ownership of the mutex. +\effects +Releases the calling thread's ownership of the mutex. \pnum \returntype \tcode{void}. \pnum -\sync This operation synchronizes with\iref{intro.multithread} subsequent +\sync +This operation synchronizes with\iref{intro.multithread} subsequent lock operations that obtain ownership on the same object. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \rSec4[thread.mutex.class]{Class \tcode{mutex}} @@ -2151,7 +2247,8 @@ own the mutex. \pnum -\effects The function attempts to obtain ownership of the mutex within the +\effects +The function attempts to obtain ownership of the mutex within the relative timeout\iref{thread.req.timing} specified by \tcode{rel_time}. If the time specified by \tcode{rel_time} is less than or equal to \tcode{rel_time.zero()}, the function attempts to obtain ownership without blocking (as if by calling @@ -2165,14 +2262,17 @@ \returntype \tcode{bool}. \pnum -\returns \tcode{true} if ownership was obtained, otherwise \tcode{false}. +\returns +\tcode{true} if ownership was obtained, otherwise \tcode{false}. \pnum -\sync If \tcode{try_lock_for()} returns \tcode{true}, prior \tcode{unlock()} operations +\sync +If \tcode{try_lock_for()} returns \tcode{true}, prior \tcode{unlock()} operations on the same object \term{synchronize with}\iref{intro.multithread} this operation. \pnum -\throws Timeout-related exceptions\iref{thread.req.timing}. +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} \pnum @@ -2186,7 +2286,8 @@ mutex. \pnum -\effects The function attempts to obtain ownership of the mutex. If +\effects +The function attempts to obtain ownership of the mutex. If \tcode{abs_time} has already passed, the function attempts to obtain ownership without blocking (as if by calling \tcode{try_lock()}). The function shall return before the absolute timeout\iref{thread.req.timing} specified by @@ -2199,15 +2300,18 @@ \returntype \tcode{bool}. \pnum -\returns \tcode{true} if ownership was obtained, otherwise \tcode{false}. +\returns +\tcode{true} if ownership was obtained, otherwise \tcode{false}. \pnum -\sync If \tcode{try_lock_until()} returns \tcode{true}, prior \tcode{unlock()} +\sync +If \tcode{try_lock_until()} returns \tcode{true}, prior \tcode{unlock()} operations on the same object \term{synchronize with}\iref{intro.multithread} this operation. \pnum -\throws Timeout-related exceptions\iref{thread.req.timing}. +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} \rSec4[thread.timedmutex.class]{Class \tcode{timed_mutex}} @@ -2357,20 +2461,24 @@ \requires The calling thread has no ownership of the mutex. \pnum -\effects Blocks the calling thread until shared ownership of the mutex can be obtained for the calling thread. +\effects +Blocks the calling thread until shared ownership of the mutex can be obtained for the calling thread. If an exception is thrown then a shared lock shall not have been acquired for the current thread. \pnum -\ensures The calling thread has a shared lock on the mutex. +\ensures +The calling thread has a shared lock on the mutex. \pnum \returntype \tcode{void}. \pnum -\sync Prior \tcode{unlock()} operations on the same object shall synchronize with\iref{intro.multithread} this operation. +\sync +Prior \tcode{unlock()} operations on the same object shall synchronize with\iref{intro.multithread} this operation. \pnum -\throws \tcode{system_error} when an exception is required\iref{thread.req.exception}. +\throws +\tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum \errors @@ -2388,17 +2496,20 @@ \requires The calling thread shall hold a shared lock on the mutex. \pnum -\effects Releases a shared lock on the mutex held by the calling thread. +\effects +Releases a shared lock on the mutex held by the calling thread. \pnum \returntype \tcode{void}. \pnum -\sync This operation synchronizes with\iref{intro.multithread} subsequent +\sync +This operation synchronizes with\iref{intro.multithread} subsequent \tcode{lock()} operations that obtain ownership on the same object. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \pnum @@ -2409,7 +2520,8 @@ \requires The calling thread has no ownership of the mutex. \pnum -\effects Attempts to obtain shared ownership of the mutex for the calling +\effects +Attempts to obtain shared ownership of the mutex for the calling thread without blocking. If shared ownership is not obtained, there is no effect and \tcode{try_lock_shared()} immediately returns. An implementation may fail to obtain the lock even if it is not held by any other thread. @@ -2418,16 +2530,19 @@ \returntype \tcode{bool}. \pnum -\returns \tcode{true} if the shared ownership lock was acquired, \tcode{false} +\returns +\tcode{true} if the shared ownership lock was acquired, \tcode{false} otherwise. \pnum -\sync If \tcode{try_lock_shared()} returns \tcode{true}, prior \tcode{unlock()} +\sync +If \tcode{try_lock_shared()} returns \tcode{true}, prior \tcode{unlock()} operations on the same object synchronize with\iref{intro.multithread} this operation. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \rSec4[thread.sharedmutex.class]{Class \tcode{shared_mutex}} @@ -2502,7 +2617,8 @@ \requires The calling thread has no ownership of the mutex. \pnum -\effects Attempts to obtain +\effects +Attempts to obtain shared lock ownership for the calling thread within the relative timeout\iref{thread.req.timing} specified by \tcode{rel_time}. If the time specified by \tcode{rel_time} is less than or equal to \tcode{rel_time.zero()}, @@ -2519,15 +2635,18 @@ \returntype \tcode{bool}. \pnum -\returns \tcode{true} if the shared lock was acquired, \tcode{false} otherwise. +\returns +\tcode{true} if the shared lock was acquired, \tcode{false} otherwise. \pnum -\sync If \tcode{try_lock_shared_for()} returns \tcode{true}, prior +\sync +If \tcode{try_lock_shared_for()} returns \tcode{true}, prior \tcode{unlock()} operations on the same object synchronize with\iref{intro.multithread} this operation. \pnum -\throws Timeout-related exceptions\iref{thread.req.timing}. +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} \pnum @@ -2539,7 +2658,8 @@ \requires The calling thread has no ownership of the mutex. \pnum -\effects The function attempts to obtain shared ownership of the mutex. If +\effects +The function attempts to obtain shared ownership of the mutex. If \tcode{abs_time} has already passed, the function attempts to obtain shared ownership without blocking (as if by calling \tcode{try_lock_shared()}). The function shall return before the absolute timeout\iref{thread.req.timing} @@ -2554,15 +2674,18 @@ \returntype \tcode{bool}. \pnum -\returns \tcode{true} if the shared lock was acquired, \tcode{false} otherwise. +\returns +\tcode{true} if the shared lock was acquired, \tcode{false} otherwise. \pnum -\sync If \tcode{try_lock_shared_until()} returns \tcode{true}, prior +\sync +If \tcode{try_lock_shared_until()} returns \tcode{true}, prior \tcode{unlock()} operations on the same object synchronize with\iref{intro.multithread} this operation. \pnum -\throws Timeout-related exceptions\iref{thread.req.timing}. +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} \rSec4[thread.sharedtimedmutex.class]{Class \tcode{shared_timed_mutex}} @@ -2694,7 +2817,8 @@ the calling thread does not own the mutex \tcode{m}. \pnum -\effects Initializes \tcode{pm} with \tcode{m}. Calls \tcode{m.lock()}. +\effects +Initializes \tcode{pm} with \tcode{m}. Calls \tcode{m.lock()}. \end{itemdescr} \indexlibrary{\idxcode{lock_guard}!constructor}% @@ -2707,10 +2831,12 @@ \requires The calling thread owns the mutex \tcode{m}. \pnum -\effects Initializes \tcode{pm} with \tcode{m}. +\effects +Initializes \tcode{pm} with \tcode{m}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrary{\idxcode{lock_guard}!destructor}% @@ -2720,7 +2846,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{pm.unlock()}. +\effects +As if by \tcode{pm.unlock()}. \end{itemdescr} @@ -2771,7 +2898,8 @@ the calling thread does not own the corresponding mutex element of \tcode{m}. \pnum -\effects Initializes \tcode{pm} with \tcode{tie(m...)}. +\effects +Initializes \tcode{pm} with \tcode{tie(m...)}. Then if \tcode{sizeof...(MutexTypes)} is \tcode{0}, no effects. Otherwise if \tcode{sizeof...(MutexTypes)} is \tcode{1}, then \tcode{m.lock()}. Otherwise, \tcode{lock(m...)}. @@ -2787,10 +2915,12 @@ \requires The calling thread owns all the mutexes in \tcode{m}. \pnum -\effects Initializes \tcode{pm} with \tcode{tie(m...)}. +\effects +Initializes \tcode{pm} with \tcode{tie(m...)}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrary{\idxcode{scoped_lock}!destructor}% @@ -2800,7 +2930,8 @@ \begin{itemdescr} \pnum -\effects For all \tcode{i} in \range{0}{sizeof...(MutexTypes)}, +\effects +For all \tcode{i} in \range{0}{sizeof...(MutexTypes)}, \tcode{get(pm).unlock()}. \end{itemdescr} @@ -2891,10 +3022,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{unique_lock}. +\effects +Constructs an object of type \tcode{unique_lock}. \pnum -\ensures \tcode{pm == 0} and \tcode{owns == false}. +\ensures +\tcode{pm == 0} and \tcode{owns == false}. \end{itemdescr} \indexlibrary{\idxcode{unique_lock}!constructor}% @@ -2907,10 +3040,12 @@ \requires If \tcode{mutex_type} is not a recursive mutex the calling thread does not own the mutex. \pnum -\effects Constructs an object of type \tcode{unique_lock} and calls \tcode{m.lock()}. +\effects +Constructs an object of type \tcode{unique_lock} and calls \tcode{m.lock()}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == true}. +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == true}. \end{itemdescr} \indexlibrary{\idxcode{unique_lock}!constructor}% @@ -2920,10 +3055,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{unique_lock}. +\effects +Constructs an object of type \tcode{unique_lock}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == false}. +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == false}. \end{itemdescr} \indexlibrary{\idxcode{unique_lock}!constructor}% @@ -2939,10 +3076,12 @@ If \tcode{mutex_type} is not a recursive mutex the calling thread does not own the mutex. \pnum -\effects Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock()}. +\effects +Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock()}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == res}, +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{m.try_lock()}. \end{itemdescr} @@ -2956,13 +3095,16 @@ \requires The calling thread owns the mutex. \pnum -\effects Constructs an object of type \tcode{unique_lock}. +\effects +Constructs an object of type \tcode{unique_lock}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == true}. +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == true}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrary{\idxcode{unique_lock}!constructor}% @@ -2978,10 +3120,12 @@ \oldconcept{TimedLockable} requirements\iref{thread.req.lockable.timed}. \pnum -\effects Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock_until(abs_time)}. +\effects +Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock_until(abs_time)}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == res}, +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{m.try_lock_until(abs_time)}. \end{itemdescr} @@ -2998,10 +3142,12 @@ The supplied \tcode{Mutex} type shall meet the \oldconcept{TimedLockable} requirements\iref{thread.req.lockable.timed}. \pnum -\effects Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock_for(rel_time)}. +\effects +Constructs an object of type \tcode{unique_lock} and calls \tcode{m.try_lock_for(rel_time)}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == res}, +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{m.try_lock_for(rel_time)}. \end{itemdescr} @@ -3012,7 +3158,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}. +\ensures +\tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}. \end{itemdescr} \indexlibrarymember{operator=}{unique_lock}% @@ -3022,16 +3169,19 @@ \begin{itemdescr} \pnum -\effects If \tcode{owns} calls \tcode{pm->unlock()}. +\effects +If \tcode{owns} calls \tcode{pm->unlock()}. \pnum -\ensures \tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}. +\ensures +\tcode{pm == u_p.pm} and \tcode{owns == u_p.owns} (where \tcode{u_p} is the state of \tcode{u} just prior to this construction), \tcode{u.pm == 0} and \tcode{u.owns == false}. \pnum \begin{note} With a recursive mutex it is possible for both \tcode{*this} and \tcode{u} to own the same mutex before the assignment. In this case, \tcode{*this} will own the mutex after the assignment and \tcode{u} will not. \end{note} \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} @@ -3042,7 +3192,8 @@ \begin{itemdescr} \pnum -\effects If \tcode{owns} calls \tcode{pm->unlock()}. +\effects +If \tcode{owns} calls \tcode{pm->unlock()}. \end{itemdescr} \rSec4[thread.lock.unique.locking]{Locking} @@ -3054,10 +3205,12 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{pm->lock()}. +\effects +As if by \tcode{pm->lock()}. \pnum -\ensures \tcode{owns == true}. +\ensures +\tcode{owns == true}. \pnum \throws @@ -3084,13 +3237,16 @@ requirements\iref{thread.req.lockable.req}. \pnum -\effects As if by \tcode{pm->try_lock()}. +\effects +As if by \tcode{pm->try_lock()}. \pnum -\returns The value returned by the call to \tcode{try_lock()}. +\returns +The value returned by the call to \tcode{try_lock()}. \pnum -\ensures \tcode{owns == res}, where \tcode{res} is the value returned by +\ensures +\tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{try_lock()}. \pnum @@ -3119,17 +3275,21 @@ requirements\iref{thread.req.lockable.timed}. \pnum -\effects As if by \tcode{pm->try_lock_until(abs_time)}. +\effects +As if by \tcode{pm->try_lock_until(abs_time)}. \pnum -\returns The value returned by the call to \tcode{try_lock_until(abs_time)}. +\returns +The value returned by the call to \tcode{try_lock_until(abs_time)}. \pnum -\ensures \tcode{owns == res}, where \tcode{res} is the value returned by +\ensures +\tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{try_lock_until(abs_time)}. \pnum -\throws Any exception thrown by \tcode{pm->try_lock_until()}. \tcode{system_error} when an +\throws +Any exception thrown by \tcode{pm->try_lock_until()}. \tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -3152,16 +3312,20 @@ \requires The supplied \tcode{Mutex} type shall meet the \oldconcept{TimedLockable} requirements\iref{thread.req.lockable.timed}. \pnum -\effects As if by \tcode{pm->try_lock_for(rel_time)}. +\effects +As if by \tcode{pm->try_lock_for(rel_time)}. \pnum -\returns The value returned by the call to \tcode{try_lock_until(rel_time)}. +\returns +The value returned by the call to \tcode{try_lock_until(rel_time)}. \pnum -\ensures \tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{try_lock_for(rel_time)}. +\ensures +\tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{try_lock_for(rel_time)}. \pnum -\throws Any exception thrown by \tcode{pm->try_lock_for()}. \tcode{system_error} when an +\throws +Any exception thrown by \tcode{pm->try_lock_for()}. \tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -3180,13 +3344,16 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{pm->unlock()}. +\effects +As if by \tcode{pm->unlock()}. \pnum -\ensures \tcode{owns == false}. +\ensures +\tcode{owns == false}. \pnum -\throws \tcode{system_error} when +\throws +\tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -3205,7 +3372,8 @@ \begin{itemdescr} \pnum -\effects Swaps the data members of \tcode{*this} and \tcode{u}. +\effects +Swaps the data members of \tcode{*this} and \tcode{u}. \end{itemdescr} \indexlibrarymember{release}{unique_lock}% @@ -3215,10 +3383,12 @@ \begin{itemdescr} \pnum -\returns The previous value of \tcode{pm}. +\returns +The previous value of \tcode{pm}. \pnum -\ensures \tcode{pm == 0} and \tcode{owns == false}. +\ensures +\tcode{pm == 0} and \tcode{owns == false}. \end{itemdescr} \indexlibrarymember{swap}{unique_lock}% @@ -3229,7 +3399,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec4[thread.lock.unique.obs]{Observers} @@ -3241,7 +3412,8 @@ \begin{itemdescr} \pnum -\returns \tcode{owns}. +\returns +\tcode{owns}. \end{itemdescr} \indexlibrarymember{operator bool}{unique_lock}% @@ -3251,7 +3423,8 @@ \begin{itemdescr} \pnum -\returns \tcode{owns}. +\returns +\tcode{owns}. \end{itemdescr} \indexlibrarymember{mutex}{unique_lock}% @@ -3261,7 +3434,8 @@ \begin{itemdescr} \pnum -\returns \tcode{pm}. +\returns +\tcode{pm}. \end{itemdescr} \rSec3[thread.lock.shared]{Class template \tcode{shared_lock}} @@ -3345,10 +3519,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{shared_lock}. +\effects +Constructs an object of type \tcode{shared_lock}. \pnum -\ensures \tcode{pm == nullptr} and \tcode{owns == false}. +\ensures +\tcode{pm == nullptr} and \tcode{owns == false}. \end{itemdescr} \indexlibrary{\idxcode{shared_lock}!constructor}% @@ -3361,10 +3537,12 @@ \requires The calling thread does not own the mutex for any ownership mode. \pnum -\effects Constructs an object of type \tcode{shared_lock} and calls \tcode{m.lock_shared()}. +\effects +Constructs an object of type \tcode{shared_lock} and calls \tcode{m.lock_shared()}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == true}. +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == true}. \end{itemdescr} \indexlibrary{\idxcode{shared_lock}!constructor}% @@ -3374,10 +3552,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{shared_lock}. +\effects +Constructs an object of type \tcode{shared_lock}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == false}. +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == false}. \end{itemdescr} \indexlibrary{\idxcode{shared_lock}!constructor}% @@ -3390,10 +3570,12 @@ \requires The calling thread does not own the mutex for any ownership mode. \pnum -\effects Constructs an object of type \tcode{shared_lock} and calls \tcode{m.try_lock_shared()}. +\effects +Constructs an object of type \tcode{shared_lock} and calls \tcode{m.try_lock_shared()}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == res} +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == res} where \tcode{res} is the value returned by the call to \tcode{m.try_lock_shared()}. \end{itemdescr} @@ -3408,10 +3590,12 @@ \requires The calling thread has shared ownership of the mutex. \pnum -\effects Constructs an object of type \tcode{shared_lock}. +\effects +Constructs an object of type \tcode{shared_lock}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == true}. +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == true}. \end{itemdescr} \indexlibrary{\idxcode{shared_lock}!constructor}% @@ -3426,11 +3610,13 @@ \requires The calling thread does not own the mutex for any ownership mode. \pnum -\effects Constructs an object of type \tcode{shared_lock} and calls +\effects +Constructs an object of type \tcode{shared_lock} and calls \tcode{m.try_lock_shared_until(abs_time)}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == res} +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == res} where \tcode{res} is the value returned by the call to \tcode{m.try_lock_shared_until(abs_time)}. \end{itemdescr} @@ -3447,11 +3633,13 @@ \requires The calling thread does not own the mutex for any ownership mode. \pnum -\effects Constructs an object of type \tcode{shared_lock} and calls +\effects +Constructs an object of type \tcode{shared_lock} and calls \tcode{m.try_lock_shared_for(rel_time)}. \pnum -\ensures \tcode{pm == addressof(m)} and \tcode{owns == res} +\ensures +\tcode{pm == addressof(m)} and \tcode{owns == res} where \tcode{res} is the value returned by the call to \tcode{m.try_lock_shared_for(rel_time)}. \end{itemdescr} @@ -3463,7 +3651,8 @@ \begin{itemdescr} \pnum -\effects If \tcode{owns} calls \tcode{pm->unlock_shared()}. +\effects +If \tcode{owns} calls \tcode{pm->unlock_shared()}. \end{itemdescr} \indexlibrary{\idxcode{shared_lock}!constructor}% @@ -3473,7 +3662,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{pm == sl_p.pm} and \tcode{owns == sl_p.owns} (where +\ensures +\tcode{pm == sl_p.pm} and \tcode{owns == sl_p.owns} (where \tcode{sl_p} is the state of \tcode{sl} just prior to this construction), \tcode{sl.pm == nullptr} and \tcode{sl.owns == false}. \end{itemdescr} @@ -3485,10 +3675,12 @@ \begin{itemdescr} \pnum -\effects If \tcode{owns} calls \tcode{pm->unlock_shared()}. +\effects +If \tcode{owns} calls \tcode{pm->unlock_shared()}. \pnum -\ensures \tcode{pm == sl_p.pm} and \tcode{owns == sl_p.owns} (where +\ensures +\tcode{pm == sl_p.pm} and \tcode{owns == sl_p.owns} (where \tcode{sl_p} is the state of \tcode{sl} just prior to this assignment), \tcode{sl.pm == nullptr} and \tcode{sl.owns == false}. \end{itemdescr} @@ -3502,13 +3694,16 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{pm->lock_shared()}. +\effects +As if by \tcode{pm->lock_shared()}. \pnum -\ensures \tcode{owns == true}. +\ensures +\tcode{owns == true}. \pnum -\throws Any exception thrown by \tcode{pm->lock_shared()}. +\throws +Any exception thrown by \tcode{pm->lock_shared()}. \tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -3527,17 +3722,21 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{pm->try_lock_shared()}. +\effects +As if by \tcode{pm->try_lock_shared()}. \pnum -\returns The value returned by the call to \tcode{pm->try_lock_shared()}. +\returns +The value returned by the call to \tcode{pm->try_lock_shared()}. \pnum -\ensures \tcode{owns == res}, where \tcode{res} is the value returned by +\ensures +\tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{pm->try_lock_shared()}. \pnum -\throws Any exception thrown by \tcode{pm->try_lock_shared()}. +\throws +Any exception thrown by \tcode{pm->try_lock_shared()}. \tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -3557,18 +3756,22 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{pm->try_lock_shared_until(abs_time)}. +\effects +As if by \tcode{pm->try_lock_shared_until(abs_time)}. \pnum -\returns The value returned by the call to +\returns +The value returned by the call to \tcode{pm->try_lock_shared_until(abs_time)}. \pnum -\ensures \tcode{owns == res}, where \tcode{res} is the value returned by +\ensures +\tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{pm->try_lock_shared_until(abs_time)}. \pnum -\throws Any exception thrown by \tcode{pm->try_lock_shared_until(abs_time)}. +\throws +Any exception thrown by \tcode{pm->try_lock_shared_until(abs_time)}. \tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -3588,16 +3791,20 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{pm->try_lock_shared_for(rel_time)}. +\effects +As if by \tcode{pm->try_lock_shared_for(rel_time)}. \pnum -\returns The value returned by the call to \tcode{pm->try_lock_shared_for(rel_time)}. +\returns +The value returned by the call to \tcode{pm->try_lock_shared_for(rel_time)}. \pnum -\ensures \tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{pm->try_lock_shared_for(rel_time)}. +\ensures +\tcode{owns == res}, where \tcode{res} is the value returned by the call to \tcode{pm->try_lock_shared_for(rel_time)}. \pnum -\throws Any exception thrown by \tcode{pm->try_lock_shared_for(rel_time)}. \tcode{system_error} when an exception is required\iref{thread.req.exception}. +\throws +Any exception thrown by \tcode{pm->try_lock_shared_for(rel_time)}. \tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum \errors @@ -3615,13 +3822,16 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{pm->unlock_shared()}. +\effects +As if by \tcode{pm->unlock_shared()}. \pnum -\ensures \tcode{owns == false}. +\ensures +\tcode{owns == false}. \pnum -\throws \tcode{system_error} when an exception is required\iref{thread.req.exception}. +\throws +\tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum \errors @@ -3640,7 +3850,8 @@ \begin{itemdescr} \pnum -\effects Swaps the data members of \tcode{*this} and \tcode{sl}. +\effects +Swaps the data members of \tcode{*this} and \tcode{sl}. \end{itemdescr} \indexlibrarymember{release}{shared_lock}% @@ -3650,10 +3861,12 @@ \begin{itemdescr} \pnum -\returns The previous value of \tcode{pm}. +\returns +The previous value of \tcode{pm}. \pnum -\ensures \tcode{pm == nullptr} and \tcode{owns == false}. +\ensures +\tcode{pm == nullptr} and \tcode{owns == false}. \end{itemdescr} \indexlibrarymember{swap}{shared_lock}% @@ -3664,7 +3877,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec4[thread.lock.shared.obs]{Observers} @@ -3676,7 +3890,8 @@ \begin{itemdescr} \pnum -\returns \tcode{owns}. +\returns +\tcode{owns}. \end{itemdescr} \indexlibrarymember{operator bool}{shared_lock}% @@ -3686,7 +3901,8 @@ \begin{itemdescr} \pnum -\returns \tcode{owns}. +\returns +\tcode{owns}. \end{itemdescr} \indexlibrarymember{mutex}{shared_lock}% @@ -3696,7 +3912,8 @@ \begin{itemdescr} \pnum -\returns \tcode{pm}. +\returns +\tcode{pm}. \end{itemdescr} \rSec2[thread.lock.algorithm]{Generic locking algorithms} @@ -3713,14 +3930,16 @@ \end{note} \pnum -\effects Calls \tcode{try_lock()} for each argument in order beginning with the +\effects +Calls \tcode{try_lock()} for each argument in order beginning with the first until all arguments have been processed or a call to \tcode{try_lock()} fails, either by returning \tcode{false} or by throwing an exception. If a call to \tcode{try_lock()} fails, \tcode{unlock()} is called for all prior arguments with no further calls to \tcode{try_lock()}. \pnum -\returns \tcode{-1} if all calls to \tcode{try_lock()} returned \tcode{true}, +\returns +\tcode{-1} if all calls to \tcode{try_lock()} returned \tcode{true}, otherwise a zero-based index value that indicates the argument for which \tcode{try_lock()} returned \tcode{false}. \end{itemdescr} @@ -3738,7 +3957,8 @@ \end{note} \pnum -\effects All arguments are locked via a sequence of calls to \tcode{lock()}, +\effects +All arguments are locked via a sequence of calls to \tcode{lock()}, \tcode{try_lock()}, or \tcode{unlock()} on each argument. The sequence of calls does not result in deadlock, but is otherwise unspecified. \begin{note} A deadlock avoidance algorithm such as try-and-back-off must be used, but the specific algorithm is not @@ -3775,13 +3995,16 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{once_flag}. +\effects +Constructs an object of type \tcode{once_flag}. \pnum -\sync The construction of a \tcode{once_flag} object is not synchronized. +\sync +The construction of a \tcode{once_flag} object is not synchronized. \pnum -\ensures The object's internal state is set to indicate to an invocation of +\ensures +The object's internal state is set to indicate to an invocation of \tcode{call_once} with the object as its initial argument that no function has been called. \end{itemdescr} @@ -3803,7 +4026,8 @@ (see \ref{func.require}) shall be a valid expression. \pnum -\effects An execution of \tcode{call_once} that does not call its \tcode{func} is a +\effects +An execution of \tcode{call_once} that does not call its \tcode{func} is a \term{passive} execution. An execution of \tcode{call_once} that calls its \tcode{func} is an \term{active} execution. An active execution shall call \tcode{\placeholdernc{INVOKE}(\brk{}% @@ -3819,13 +4043,15 @@ earlier returning execution. \end{note} \pnum -\sync For any given \tcode{once_flag}: all active executions occur in a total +\sync +For any given \tcode{once_flag}: all active executions occur in a total order; completion of an active execution synchronizes with\iref{intro.multithread} the start of the next one in this total order; and the returning execution synchronizes with the return from all passive executions. \pnum -\throws \tcode{system_error} when +\throws +\tcode{system_error} when an exception is required\iref{thread.req.exception}, or any exception thrown by \tcode{func}. \pnum @@ -3927,7 +4153,8 @@ \end{itemize} \pnum -\effects Transfers ownership of the lock associated with \tcode{lk} into +\effects +Transfers ownership of the lock associated with \tcode{lk} into internal storage and schedules \tcode{cond} to be notified when the current thread exits, after all objects of thread storage duration associated with the current thread have been destroyed. This notification shall be as if: @@ -3937,7 +4164,8 @@ \end{codeblock} \pnum -\sync The implied \tcode{lk.unlock()} call is sequenced after the destruction of +\sync +The implied \tcode{lk.unlock()} call is sequenced after the destruction of all objects with thread storage duration associated with the current thread. \pnum @@ -4008,10 +4236,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{condition_variable}. +\effects +Constructs an object of type \tcode{condition_variable}. \pnum -\throws \tcode{system_error} when an exception is required\iref{thread.req.exception}. +\throws +\tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum \errors @@ -4039,7 +4269,8 @@ \end{note} \pnum -\effects Destroys the object. +\effects +Destroys the object. \end{itemdescr} \indexlibrarymember{notify_one}{condition_variable}% @@ -4049,7 +4280,8 @@ \begin{itemdescr} \pnum -\effects If any threads are blocked waiting for \tcode{*this}, unblocks one of those threads. +\effects +If any threads are blocked waiting for \tcode{*this}, unblocks one of those threads. \end{itemdescr} \indexlibrarymember{notify_all}{condition_variable}% @@ -4059,7 +4291,8 @@ \begin{itemdescr} \pnum -\effects Unblocks all threads that are blocked waiting for \tcode{*this}. +\effects +Unblocks all threads that are blocked waiting for \tcode{*this}. \end{itemdescr} \indexlibrarymember{wait}{condition_variable}% @@ -4094,11 +4327,13 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} +\ensures +\tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} is locked by the calling thread. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} @@ -4121,7 +4356,8 @@ \end{itemize} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} while (!pred()) wait(lock); @@ -4134,11 +4370,13 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} +\ensures +\tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} is locked by the calling thread. \pnum -\throws Any exception thrown by \tcode{pred}. +\throws +Any exception thrown by \tcode{pred}. \end{itemdescr} @@ -4185,16 +4423,19 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} +\ensures +\tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} is locked by the calling thread. \pnum -\returns \tcode{cv_status::timeout} if +\returns +\tcode{cv_status::timeout} if the absolute timeout\iref{thread.req.timing} specified by \tcode{abs_time} expired, otherwise \tcode{cv_status::no_timeout}. \pnum -\throws Timeout-related +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} @@ -4218,13 +4459,15 @@ \end{itemize} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return wait_until(lock, chrono::steady_clock::now() + rel_time); \end{codeblock} \pnum -\returns \tcode{cv_status::timeout} if +\returns +\tcode{cv_status::timeout} if the relative timeout\iref{thread.req.timing} specified by \tcode{rel_time} expired, otherwise \tcode{cv_status::no_timeout}. @@ -4235,11 +4478,13 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} +\ensures +\tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} is locked by the calling thread. \pnum -\throws Timeout-related +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} @@ -4265,7 +4510,8 @@ \end{itemize} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} while (!pred()) if (wait_until(lock, abs_time) == cv_status::timeout) @@ -4280,7 +4526,8 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} +\ensures +\tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} is locked by the calling thread. \pnum @@ -4288,7 +4535,8 @@ \tcode{true} regardless of whether the timeout was triggered. \end{note} \pnum -\throws Timeout-related +\throws +Timeout-related exceptions\iref{thread.req.timing} or any exception thrown by \tcode{pred}. \end{itemdescr} @@ -4316,7 +4564,8 @@ \end{itemize} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return wait_until(lock, chrono::steady_clock::now() + rel_time, std::move(pred)); \end{codeblock} @@ -4332,7 +4581,8 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} +\ensures +\tcode{lock.owns_lock()} is \tcode{true} and \tcode{lock.mutex()} is locked by the calling thread. \pnum @@ -4340,7 +4590,8 @@ regardless of whether the timeout was triggered. \end{note} \pnum -\throws Timeout-related +\throws +Timeout-related exceptions\iref{thread.req.timing} or any exception thrown by \tcode{pred}. \end{itemdescr} @@ -4406,10 +4657,12 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{condition_variable_any}. +\effects +Constructs an object of type \tcode{condition_variable_any}. \pnum -\throws \tcode{bad_alloc} or \tcode{system_error} when an exception is +\throws +\tcode{bad_alloc} or \tcode{system_error} when an exception is required\iref{thread.req.exception}. \pnum @@ -4441,7 +4694,8 @@ \end{note} \pnum -\effects Destroys the object. +\effects +Destroys the object. \end{itemdescr} \indexlibrarymember{notify_one}{condition_variable_any}% @@ -4451,7 +4705,8 @@ \begin{itemdescr} \pnum -\effects If any threads are blocked waiting for \tcode{*this}, unblocks one of those threads. +\effects +If any threads are blocked waiting for \tcode{*this}, unblocks one of those threads. \end{itemdescr} \indexlibrarymember{notify_all}{condition_variable_any}% @@ -4461,7 +4716,8 @@ \begin{itemdescr} \pnum -\effects Unblocks all threads that are blocked waiting for \tcode{*this}. +\effects +Unblocks all threads that are blocked waiting for \tcode{*this}. \end{itemdescr} \rSec3[thread.condvarany.wait]{Noninterruptible waits} @@ -4489,10 +4745,12 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock} is locked by the calling thread. +\ensures +\tcode{lock} is locked by the calling thread. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} @@ -4504,7 +4762,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} while (!pred()) wait(lock); @@ -4544,15 +4803,18 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock} is locked by the calling thread. +\ensures +\tcode{lock} is locked by the calling thread. \pnum -\returns \tcode{cv_status::timeout} if +\returns +\tcode{cv_status::timeout} if the absolute timeout\iref{thread.req.timing} specified by \tcode{abs_time} expired, otherwise \tcode{cv_status::no_timeout}. \pnum -\throws Timeout-related +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} @@ -4565,13 +4827,15 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return wait_until(lock, chrono::steady_clock::now() + rel_time); \end{codeblock} \pnum -\returns \tcode{cv_status::timeout} if +\returns +\tcode{cv_status::timeout} if the relative timeout\iref{thread.req.timing} specified by \tcode{rel_time} expired, otherwise \tcode{cv_status::no_timeout}. @@ -4582,10 +4846,12 @@ \begin{note} This can happen if the re-locking of the mutex throws an exception. \end{note} \pnum -\ensures \tcode{lock} is locked by the calling thread. +\ensures +\tcode{lock} is locked by the calling thread. \pnum -\throws Timeout-related +\throws +Timeout-related exceptions\iref{thread.req.timing}. \end{itemdescr} @@ -4598,7 +4864,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} while (!pred()) if (wait_until(lock, abs_time) == cv_status::timeout) @@ -4623,7 +4890,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return wait_until(lock, chrono::steady_clock::now() + rel_time, std::move(pred)); \end{codeblock} @@ -4664,7 +4932,8 @@ \end{note} \pnum -\ensures \tcode{lock} is locked by the calling thread. +\ensures +\tcode{lock} is locked by the calling thread. \pnum \remarks @@ -4675,7 +4944,8 @@ \end{note} \pnum -\throws Any exception thrown by \tcode{pred}. +\throws +Any exception thrown by \tcode{pred}. \end{itemdescr} \begin{itemdecl} @@ -4714,7 +4984,8 @@ \end{note} \pnum -\ensures \tcode{lock} is locked by the calling thread. +\ensures +\tcode{lock} is locked by the calling thread. \pnum \remarks @@ -4738,7 +5009,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return wait_until(lock, chrono::steady_clock::now() + rel_time, std::move(pred), std::move(stoken)); @@ -5490,7 +5762,8 @@ \begin{itemdescr} \pnum -\returns\ A reference to an object of a type derived from class \tcode{error_category}. +\returns +A reference to an object of a type derived from class \tcode{error_category}. \pnum The object's \tcode{default_error_condition} and equivalent virtual functions shall @@ -5505,7 +5778,8 @@ \begin{itemdescr} \pnum -\returns \tcode{error_code(static_cast(e), future_category())}. +\returns +\tcode{error_code(static_cast(e), future_category())}. \end{itemdescr} \indexlibrarymember{make_error_condition}{future_errc}% @@ -5515,7 +5789,8 @@ \begin{itemdescr} \pnum -\returns \tcode{error_condition(static_cast(e), future_category())}. +\returns +\tcode{error_condition(static_cast(e), future_category())}. \end{itemdescr} \rSec2[futures.future.error]{Class \tcode{future_error}} @@ -5543,7 +5818,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{future_error} +\effects +Constructs an object of class \tcode{future_error} and initializes \tcode{ec_} with \tcode{make_error_code(e)}. \end{itemdescr} @@ -5554,7 +5830,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ec_}. +\returns +\tcode{ec_}. \end{itemdescr} \indexlibrarymember{what}{future_error}% @@ -5564,7 +5841,8 @@ \begin{itemdescr} \pnum -\returns An \ntbs{} incorporating \tcode{code().message()}. +\returns +An \ntbs{} incorporating \tcode{code().message()}. \end{itemdescr} \rSec2[futures.state]{Shared state} @@ -5754,7 +6032,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{promise} object and a shared state. The second +\effects +Constructs a \tcode{promise} object and a shared state. The second constructor uses the allocator \tcode{a} to allocate memory for the shared state. \end{itemdescr} @@ -5766,11 +6045,13 @@ \begin{itemdescr} \pnum -\effects Constructs a new \tcode{promise} object and transfers ownership of the shared state +\effects +Constructs a new \tcode{promise} object and transfers ownership of the shared state of \tcode{rhs} (if any) to the newly-constructed object. \pnum -\ensures \tcode{rhs} has no shared state. +\ensures +\tcode{rhs} has no shared state. \end{itemdescr} \indexlibrary{\idxcode{promise}!destructor}% @@ -5796,7 +6077,8 @@ \tcode{promise(std::move(rhs)).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{promise}% @@ -5806,10 +6088,12 @@ \begin{itemdescr} \pnum -\effects Exchanges the shared state of \tcode{*this} and \tcode{other}. +\effects +Exchanges the shared state of \tcode{*this} and \tcode{other}. \pnum -\ensures \tcode{*this} has the shared state (if any) that \tcode{other} had +\ensures +\tcode{*this} has the shared state (if any) that \tcode{other} had prior to the call to \tcode{swap}. \tcode{other} has the shared state (if any) that \tcode{*this} had prior to the call to \tcode{swap}. \end{itemdescr} @@ -5821,11 +6105,13 @@ \begin{itemdescr} \pnum -\returns A \tcode{future} object with the same shared state as +\returns +A \tcode{future} object with the same shared state as \tcode{*this}. \pnum -\sync Calls to this function do not introduce +\sync +Calls to this function do not introduce data races~\iref{intro.multithread} with calls to \tcode{set_value}, \tcode{set_exception}, @@ -5836,7 +6122,8 @@ \end{note} \pnum -\throws \tcode{future_error} if \tcode{*this} has no shared state or if +\throws +\tcode{future_error} if \tcode{*this} has no shared state or if \tcode{get_future} has already been called on a \tcode{promise} with the same shared state as \tcode{*this}. @@ -5861,7 +6148,8 @@ \begin{itemdescr} \pnum -\effects Atomically stores the value \tcode{r} in the shared state and +\effects +Atomically stores the value \tcode{r} in the shared state and makes that state ready\iref{futures.state}. \pnum @@ -5893,11 +6181,13 @@ \requires \tcode{p} is not null. \pnum -\effects Atomically stores the exception pointer \tcode{p} in the shared state +\effects +Atomically stores the exception pointer \tcode{p} in the shared state and makes that state ready\iref{futures.state}. \pnum -\throws \tcode{future_error} if its shared state +\throws +\tcode{future_error} if its shared state already has a stored value or exception. \pnum @@ -5920,7 +6210,8 @@ \begin{itemdescr} \pnum -\effects Stores the value \tcode{r} in the shared state without making that +\effects +Stores the value \tcode{r} in the shared state without making that state ready immediately. Schedules that state to be made ready when the current thread exits, after all objects of thread storage duration associated with the current thread have been destroyed. @@ -5954,13 +6245,15 @@ \requires \tcode{p} is not null. \pnum -\effects Stores the exception pointer \tcode{p} in the shared state without +\effects +Stores the exception pointer \tcode{p} in the shared state without making that state ready immediately. Schedules that state to be made ready when the current thread exits, after all objects of thread storage duration associated with the current thread have been destroyed. \pnum -\throws \tcode{future_error} if an error condition occurs. +\throws +\tcode{future_error} if an error condition occurs. \pnum \errors @@ -5979,7 +6272,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec2[futures.unique.future]{Class template \tcode{future}} @@ -6054,12 +6348,14 @@ \begin{itemdescr} \pnum -\effects Constructs an \defnx{empty}{empty \tcode{future} object} +\effects +Constructs an \defnx{empty}{empty \tcode{future} object} \tcode{future} object that does not refer to a shared state. \pnum -\ensures \tcode{valid() == false}. +\ensures +\tcode{valid() == false}. \end{itemdescr} \indexlibrary{\idxcode{future}!constructor}% @@ -6069,7 +6365,8 @@ \begin{itemdescr} \pnum -\effects Move constructs a \tcode{future} object that refers to the shared +\effects +Move constructs a \tcode{future} object that refers to the shared state that was originally referred to by \tcode{rhs} (if any). @@ -6132,10 +6429,12 @@ \begin{itemdescr} \pnum -\returns \tcode{shared_future(std::move(*this))}. +\returns +\tcode{shared_future(std::move(*this))}. \pnum -\ensures \tcode{valid() == false}. +\ensures +\tcode{valid() == false}. \end{itemdescr} \indexlibrarymember{get}{future}% @@ -6175,10 +6474,12 @@ \end{itemize} \pnum -\throws The stored exception, if an exception was stored in the shared state. +\throws +The stored exception, if an exception was stored in the shared state. \pnum -\ensures \tcode{valid() == false}. +\ensures +\tcode{valid() == false}. \end{itemdescr} \indexlibrarymember{valid}{future}% @@ -6188,7 +6489,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} only if \tcode{*this} refers to a shared state. +\returns +\tcode{true} only if \tcode{*this} refers to a shared state. \end{itemdescr} \indexlibrarymember{wait}{future}% @@ -6340,12 +6642,14 @@ \begin{itemdescr} \pnum -\effects Constructs an \defnx{empty}{empty \tcode{shared_future} object} +\effects +Constructs an \defnx{empty}{empty \tcode{shared_future} object} \tcode{shared_future} object that does not refer to a shared state. \pnum -\ensures \tcode{valid() == false}. +\ensures +\tcode{valid() == false}. \end{itemdescr} \indexlibrary{\idxcode{shared_future}!constructor}% @@ -6355,11 +6659,13 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{shared_future} object that refers to the same +\effects +Constructs a \tcode{shared_future} object that refers to the same shared state as \tcode{rhs} (if any). \pnum -\ensures \tcode{valid()} returns the same value as \tcode{rhs.valid()}. +\ensures +\tcode{valid()} returns the same value as \tcode{rhs.valid()}. \end{itemdescr} \indexlibrary{\idxcode{shared_future}!constructor}% @@ -6370,7 +6676,8 @@ \begin{itemdescr} \pnum -\effects Move constructs a \tcode{shared_future} object that refers to the +\effects +Move constructs a \tcode{shared_future} object that refers to the shared state that was originally referred to by \tcode{rhs} (if any). \pnum @@ -6443,7 +6750,8 @@ \end{itemize} \pnum -\ensures \tcode{valid() == rhs.valid()}. +\ensures +\tcode{valid() == rhs.valid()}. \end{itemdescr} \indexlibrarymember{get}{shared_future}% @@ -6468,7 +6776,8 @@ \end{note} \pnum -\effects \tcode{wait()}{s} until the shared state is ready, then retrieves the +\effects +\tcode{wait()}{s} until the shared state is ready, then retrieves the value stored in the shared state. \pnum @@ -6491,7 +6800,8 @@ \end{itemize} \pnum -\throws The stored exception, if an exception was stored in the shared state. +\throws +The stored exception, if an exception was stored in the shared state. \end{itemdescr} \indexlibrarymember{valid}{shared_future}% @@ -6501,7 +6811,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} only if \tcode{*this} refers to a shared state. +\returns +\tcode{true} only if \tcode{*this} refers to a shared state. \end{itemdescr} \indexlibrarymember{wait}{shared_future}% @@ -6679,7 +6990,8 @@ \end{itemize} \pnum -\returns An object of type +\returns +An object of type \tcode{future, decay_t...>{>}} that refers to the shared state created by this call to \tcode{async}. \begin{note} If a future obtained from \tcode{async} is moved outside the local scope, @@ -6724,7 +7036,8 @@ \pnum -\throws \tcode{system_error} if \tcode{policy == launch::async} and the +\throws +\tcode{system_error} if \tcode{policy == launch::async} and the implementation is unable to start a new thread, or \tcode{std::bad_alloc} if memory for the internal data structures could not be allocated. @@ -6818,7 +7131,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{packaged_task} object with no shared state and no stored task. +\effects +Constructs a \tcode{packaged_task} object with no shared state and no stored task. \end{itemdescr} \indexlibrary{\idxcode{packaged_task}!constructor}% @@ -6840,7 +7154,8 @@ is the same type as \tcode{packaged_task}. \pnum -\effects Constructs a new \tcode{packaged_task} object with a shared state and +\effects +Constructs a new \tcode{packaged_task} object with a shared state and initializes the object's stored task with \tcode{std::forward(f)}. \pnum @@ -6857,12 +7172,14 @@ \begin{itemdescr} \pnum -\effects Constructs a new \tcode{packaged_task} object and transfers ownership of +\effects +Constructs a new \tcode{packaged_task} object and transfers ownership of \tcode{rhs}'s shared state to \tcode{*this}, leaving \tcode{rhs} with no shared state. Moves the stored task from \tcode{rhs} to \tcode{*this}. \pnum -\ensures \tcode{rhs} has no shared state. +\ensures +\tcode{rhs} has no shared state. \end{itemdescr} \indexlibrarymember{operator=}{packaged_task}% @@ -6899,10 +7216,12 @@ \begin{itemdescr} \pnum -\effects Exchanges the shared states and stored tasks of \tcode{*this} and \tcode{other}. +\effects +Exchanges the shared states and stored tasks of \tcode{*this} and \tcode{other}. \pnum -\ensures \tcode{*this} has the same shared state +\ensures +\tcode{*this} has the same shared state and stored task (if any) as \tcode{other} prior to the call to \tcode{swap}. \tcode{other} has the same shared state and stored task (if any) @@ -6916,7 +7235,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} only if \tcode{*this} has a shared state. +\returns +\tcode{true} only if \tcode{*this} has a shared state. \end{itemdescr} \indexlibrarymember{get_future}{packaged_task}% @@ -6926,10 +7246,12 @@ \begin{itemdescr} \pnum -\returns A \tcode{future} object that shares the same shared state as \tcode{*this}. +\returns +A \tcode{future} object that shares the same shared state as \tcode{*this}. \pnum -\sync Calls to this function do not introduce +\sync +Calls to this function do not introduce data races~\iref{intro.multithread} with calls to \tcode{operator()} or \tcode{make_ready_at_thread_exit}. @@ -6938,7 +7260,8 @@ \end{note} \pnum -\throws A \tcode{future_error} object if an error occurs. +\throws +A \tcode{future_error} object if an error occurs. \pnum \errors @@ -6956,7 +7279,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{\placeholdernc{INVOKE}(f, t$_1$, t$_2$, $\dotsc$, t$_N$)}\iref{func.require}, +\effects +As if by \tcode{\placeholdernc{INVOKE}(f, t$_1$, t$_2$, $\dotsc$, t$_N$)}\iref{func.require}, where \tcode{f} is the stored task of \tcode{*this} and \tcode{t$_1$, t$_2$, $\dotsc$, t$_N$} are the values in \tcode{args...}. If the task returns normally, @@ -6967,7 +7291,8 @@ the shared state of \tcode{*this} to become ready are unblocked. \pnum -\throws A \tcode{future_error} exception object if there is no shared +\throws +A \tcode{future_error} exception object if there is no shared state or the stored task has already been invoked. \pnum @@ -6986,7 +7311,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{\placeholdernc{INVOKE}(f, t$_1$, t$_2$, $\dotsc$, t$_N$)}\iref{func.require}, +\effects +As if by \tcode{\placeholdernc{INVOKE}(f, t$_1$, t$_2$, $\dotsc$, t$_N$)}\iref{func.require}, where \tcode{f} is the stored task and \tcode{t$_1$, t$_2$, $\dotsc$, t$_N$} are the values in \tcode{args...}. If the task returns normally, the return value is stored as the asynchronous result in the shared state of @@ -6997,7 +7323,8 @@ have been destroyed. \pnum -\throws \tcode{future_error} if an error condition occurs. +\throws +\tcode{future_error} if an error condition occurs. \pnum \errors @@ -7015,7 +7342,8 @@ \begin{itemdescr} \pnum -\effects As if \tcode{*this = packaged_task(std::move(f))}, where +\effects +As if \tcode{*this = packaged_task(std::move(f))}, where \tcode{f} is the task stored in \tcode{*this}. \begin{note} This constructs a new shared state for \tcode{*this}. The old state is abandoned\iref{futures.state}. \end{note} @@ -7041,5 +7369,6 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} diff --git a/source/time.tex b/source/time.tex index 8e7f6da4a8..6d0568ff4d 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1059,12 +1059,14 @@ \begin{itemdescr} \pnum -\returns \tcode{Rep(0)}. \begin{note} \tcode{Rep(0)} is specified instead of +\returns +\tcode{Rep(0)}. \begin{note} \tcode{Rep(0)} is specified instead of \tcode{Rep()} because \tcode{Rep()} may have some other meaning, such as an uninitialized value. \end{note} \pnum -\remarks The value returned shall be the additive identity. +\remarks +The value returned shall be the additive identity. \end{itemdescr} \indexlibrarymember{min}{duration_values}% @@ -1074,10 +1076,12 @@ \begin{itemdescr} \pnum -\returns \tcode{numeric_limits::lowest()}. +\returns +\tcode{numeric_limits::lowest()}. \pnum -\remarks The value returned shall compare less than or equal to \tcode{zero()}. +\remarks +The value returned shall compare less than or equal to \tcode{zero()}. \end{itemdescr} \indexlibrarymember{max}{duration_values}% @@ -1087,10 +1091,12 @@ \begin{itemdescr} \pnum -\returns \tcode{numeric_limits::max()}. +\returns +\tcode{numeric_limits::max()}. \pnum -\remarks The value returned shall compare greater than \tcode{zero()}. +\remarks +The value returned shall compare greater than \tcode{zero()}. \end{itemdescr} \rSec2[time.traits.specializations]{Specializations of \tcode{common_type}} @@ -1265,7 +1271,8 @@ \begin{itemdescr} \pnum -\remarks This constructor shall not participate in overload +\remarks +This constructor shall not participate in overload resolution unless \tcode{Rep2} is implicitly convertible to \tcode{rep} and \begin{itemize} @@ -1280,10 +1287,12 @@ \end{example} \pnum -\effects Constructs an object of type \tcode{duration}. +\effects +Constructs an object of type \tcode{duration}. \pnum -\ensures \tcode{count() == static_cast(r)}. +\ensures +\tcode{count() == static_cast(r)}. \end{itemdescr} \indexlibrary{\idxcode{duration}!constructor}% @@ -1294,7 +1303,8 @@ \begin{itemdescr} \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless no overflow is induced in the conversion and \tcode{treat_as_floating_point_v} is \tcode{true} or both \tcode{ratio_divide::den} is \tcode{1} and @@ -1311,7 +1321,8 @@ \end{example} \pnum -\effects Constructs an object of type \tcode{duration}, constructing \tcode{rep_} from\\ +\effects +Constructs an object of type \tcode{duration}, constructing \tcode{rep_} from\\ \tcode{duration_cast(d).count()}. \end{itemdescr} @@ -1324,7 +1335,8 @@ \begin{itemdescr} \pnum -\returns \tcode{rep_}. +\returns +\tcode{rep_}. \end{itemdescr} \rSec2[time.duration.arithmetic]{Arithmetic} @@ -1336,7 +1348,8 @@ \begin{itemdescr} \pnum -\returns \tcode{common_type_t(*this)}. +\returns +\tcode{common_type_t(*this)}. \end{itemdescr} \indexlibrarymember{operator-}{duration}% @@ -1346,7 +1359,8 @@ \begin{itemdescr} \pnum -\returns \tcode{common_type_t(-rep_)}. +\returns +\tcode{common_type_t(-rep_)}. \end{itemdescr} \indexlibrarymember{operator++}{duration}% @@ -1356,10 +1370,12 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{++rep_}. +\effects +As if by \tcode{++rep_}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator++}{duration}% @@ -1369,7 +1385,8 @@ \begin{itemdescr} \pnum -\returns \tcode{duration(rep_++)}. +\returns +\tcode{duration(rep_++)}. \end{itemdescr} \indexlibrarymember{operator\dcr}{duration}% @@ -1379,10 +1396,12 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{--rep_}. +\effects +As if by \tcode{--rep_}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator\dcr}{duration}% @@ -1392,7 +1411,8 @@ \begin{itemdescr} \pnum -\returns \tcode{duration(rep_-{}-)}. +\returns +\tcode{duration(rep_-{}-)}. \end{itemdescr} \indexlibrarymember{operator+=}{duration}% @@ -1402,10 +1422,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{rep_ += d.count();} +\effects +As if by: \tcode{rep_ += d.count();} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{duration}% @@ -1415,10 +1437,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{rep_ -= d.count();} +\effects +As if by: \tcode{rep_ -= d.count();} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator*=}{duration}% @@ -1428,10 +1452,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{rep_ *= rhs;} +\effects +As if by: \tcode{rep_ *= rhs;} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator/=}{duration}% @@ -1441,10 +1467,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{rep_ /= rhs;} +\effects +As if by: \tcode{rep_ /= rhs;} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator\%=}{duration}% @@ -1454,10 +1482,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{rep_ \%= rhs;} +\effects +As if by: \tcode{rep_ \%= rhs;} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator\%=}{duration}% @@ -1467,10 +1497,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{rep_ \%= rhs.count();} +\effects +As if by: \tcode{rep_ \%= rhs.count();} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} @@ -1483,7 +1515,8 @@ \begin{itemdescr} \pnum -\returns \tcode{duration(duration_values::zero())}. +\returns +\tcode{duration(duration_values::zero())}. \end{itemdescr} \indexlibrarymember{min}{duration}% @@ -1493,7 +1526,8 @@ \begin{itemdescr} \pnum -\returns \tcode{duration(duration_values::min())}. +\returns +\tcode{duration(duration_values::min())}. \end{itemdescr} \indexlibrarymember{max}{duration}% @@ -1503,7 +1537,8 @@ \begin{itemdescr} \pnum -\returns \tcode{duration(duration_values::max())}. +\returns +\tcode{duration(duration_values::max())}. \end{itemdescr} \rSec2[time.duration.nonmember]{Non-member arithmetic} @@ -1521,7 +1556,8 @@ \begin{itemdescr} \pnum -\returns \tcode{CD(CD(lhs).count() + CD(rhs).count())}. +\returns +\tcode{CD(CD(lhs).count() + CD(rhs).count())}. \end{itemdescr} \indexlibrary{\idxcode{common_type}}% @@ -1533,7 +1569,8 @@ \begin{itemdescr} \pnum -\returns \tcode{CD(CD(lhs).count() - CD(rhs).count())}. +\returns +\tcode{CD(CD(lhs).count() - CD(rhs).count())}. \end{itemdescr} \indexlibrarymember{operator*}{duration}% @@ -1545,11 +1582,13 @@ \begin{itemdescr} \pnum -\remarks This operator shall not participate in overload +\remarks +This operator shall not participate in overload resolution unless \tcode{Rep2} is implicitly convertible to \tcode{common_type_t}. \pnum -\returns \tcode{CD(CD(d).count() * s)}. +\returns +\tcode{CD(CD(d).count() * s)}. \end{itemdescr} \indexlibrarymember{operator*}{duration}% @@ -1561,11 +1600,13 @@ \begin{itemdescr} \pnum -\remarks This operator shall not participate in overload +\remarks +This operator shall not participate in overload resolution unless \tcode{Rep1} is implicitly convertible to \tcode{common_type_t}. \pnum -\returns \tcode{d * s}. +\returns +\tcode{d * s}. \end{itemdescr} \indexlibrarymember{operator/}{duration}% @@ -1577,12 +1618,14 @@ \begin{itemdescr} \pnum -\remarks This operator shall not participate in overload +\remarks +This operator shall not participate in overload resolution unless \tcode{Rep2} is implicitly convertible to \tcode{common_type_t} and \tcode{Rep2} is not a specialization of \tcode{duration}. \pnum -\returns \tcode{CD(CD(d).count() / s)}. +\returns +\tcode{CD(CD(d).count() / s)}. \end{itemdescr} \indexlibrarymember{operator/}{duration}% @@ -1598,7 +1641,8 @@ \tcode{common_type_t, duration>}. \pnum -\returns \tcode{CD(lhs).count() / CD(rhs).count()}. +\returns +\tcode{CD(lhs).count() / CD(rhs).count()}. \end{itemdescr} \indexlibrarymember{operator\%}{duration}% @@ -1610,12 +1654,14 @@ \begin{itemdescr} \pnum -\remarks This operator shall not participate in overload +\remarks +This operator shall not participate in overload resolution unless \tcode{Rep2} is implicitly convertible to \tcode{common_type_t} and \tcode{Rep2} is not a specialization of \tcode{duration}. \pnum -\returns \tcode{CD(CD(d).count() \% s)}. +\returns +\tcode{CD(CD(d).count() \% s)}. \end{itemdescr} \indexlibrarymember{operator\%}{duration}% @@ -1627,7 +1673,8 @@ \begin{itemdescr} \pnum -\returns \tcode{CD(CD(lhs).count() \% CD(rhs).count())}. +\returns +\tcode{CD(CD(lhs).count() \% CD(rhs).count())}. \end{itemdescr} @@ -1647,7 +1694,8 @@ \begin{itemdescr} \pnum -\returns \tcode{CT(lhs).count() == CT(rhs).count()}. +\returns +\tcode{CT(lhs).count() == CT(rhs).count()}. \end{itemdescr} \indexlibrarymember{operator<}{duration}% @@ -1659,7 +1707,8 @@ \begin{itemdescr} \pnum -\returns \tcode{CT(lhs).count() < CT(rhs).count()}. +\returns +\tcode{CT(lhs).count() < CT(rhs).count()}. \end{itemdescr} \indexlibrarymember{operator>}{duration}% @@ -1671,7 +1720,8 @@ \begin{itemdescr} \pnum -\returns \tcode{rhs < lhs}. +\returns +\tcode{rhs < lhs}. \end{itemdescr} \indexlibrarymember{operator<=}{duration}% @@ -1683,7 +1733,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(rhs < lhs)}. +\returns +\tcode{!(rhs < lhs)}. \end{itemdescr} \indexlibrarymember{operator>=}{duration}% @@ -1695,7 +1746,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(lhs < rhs)}. +\returns +\tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrarymember{operator<=>}{duration}% @@ -1708,7 +1760,8 @@ \begin{itemdescr} \pnum -\returns \tcode{CT(lhs).count() <=> CT(rhs).count()}. +\returns +\tcode{CT(lhs).count() <=> CT(rhs).count()}. \end{itemdescr} \rSec2[time.duration.cast]{\tcode{duration_cast}} @@ -1722,11 +1775,13 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{ToDuration} is a specialization of \tcode{duration}. \pnum -\returns Let \tcode{CF} be \tcode{ratio_divide}, and \tcode{CR} be \tcode{common_type::type}. \begin{itemize} @@ -1772,11 +1827,13 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{ToDuration} is a specialization of \tcode{duration}. \pnum -\returns The greatest result \tcode{t} representable in \tcode{ToDuration} +\returns +The greatest result \tcode{t} representable in \tcode{ToDuration} for which \tcode{t <= d}. \end{itemdescr} @@ -1788,11 +1845,13 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{ToDuration} is a specialization of \tcode{duration}. \pnum -\returns The least result \tcode{t} representable in \tcode{ToDuration} +\returns +The least result \tcode{t} representable in \tcode{ToDuration} for which \tcode{t >= d}. \end{itemdescr} @@ -1804,13 +1863,15 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{ToDuration} is a specialization of \tcode{duration}, and \tcode{treat_as_floating_point_v} is \tcode{false}. \pnum -\returns The value of \tcode{ToDuration} that is closest to \tcode{d}. +\returns +The value of \tcode{ToDuration} that is closest to \tcode{d}. If there are two closest values, then return the value \tcode{t} for which \tcode{t \% 2 == 0}. \end{itemdescr} @@ -1933,11 +1994,13 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{numeric_limits::is_signed} is \tcode{true}. \pnum -\returns If \tcode{d >= d.zero()}, return \tcode{d}, +\returns +If \tcode{d >= d.zero()}, return \tcode{d}, otherwise return \tcode{-d}. \end{itemdescr} @@ -2007,7 +2070,8 @@ the unit suffix \tcode{"us"} is used instead of \tcode{"\textmu{}s"}. \pnum -\returns \tcode{os}. +\returns +\tcode{os}. \end{itemdescr} \indexlibrarymember{from_stream}{duration}% @@ -2036,7 +2100,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec1[time.point]{Class template \tcode{time_point}} @@ -2098,7 +2163,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{time_point}, initializing +\effects +Constructs an object of type \tcode{time_point}, initializing \tcode{d_} with \tcode{duration::zero()}. Such a \tcode{time_point} object represents the epoch. \end{itemdescr} @@ -2110,7 +2176,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of type \tcode{time_point}, initializing +\effects +Constructs an object of type \tcode{time_point}, initializing \tcode{d_} with \tcode{d}. Such a \tcode{time_point} object represents the epoch \tcode{+ d}. \end{itemdescr} @@ -2123,11 +2190,13 @@ \begin{itemdescr} \pnum -\remarks This constructor shall not participate in overload resolution unless \tcode{Duration2} +\remarks +This constructor shall not participate in overload resolution unless \tcode{Duration2} is implicitly convertible to \tcode{duration}. \pnum -\effects Constructs an object of type \tcode{time_point}, initializing +\effects +Constructs an object of type \tcode{time_point}, initializing \tcode{d_} with \tcode{t.time_since_epoch()}. \end{itemdescr} @@ -2140,7 +2209,8 @@ \begin{itemdescr} \pnum -\returns \tcode{d_}. +\returns +\tcode{d_}. \end{itemdescr} \rSec2[time.point.arithmetic]{Arithmetic} @@ -2152,10 +2222,12 @@ \begin{itemdescr} \pnum -\effects \tcode{++d_}. +\effects +\tcode{++d_}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator++}{time_point}% @@ -2165,7 +2237,8 @@ \begin{itemdescr} \pnum -\returns \tcode{time_point\{d_++\}}. +\returns +\tcode{time_point\{d_++\}}. \end{itemdescr} \indexlibrarymember{operator--}{time_point}% @@ -2175,10 +2248,12 @@ \begin{itemdescr} \pnum -\effects \tcode{--d_}. +\effects +\tcode{--d_}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator--}{time_point}% @@ -2188,7 +2263,8 @@ \begin{itemdescr} \pnum -\returns \tcode{time_point\{d_--\}}. +\returns +\tcode{time_point\{d_--\}}. \end{itemdescr} \indexlibrarymember{operator+=}{time_point}% @@ -2198,10 +2274,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{d_ += d;} +\effects +As if by: \tcode{d_ += d;} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{time_point}% @@ -2211,10 +2289,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{d_ -= d;} +\effects +As if by: \tcode{d_ -= d;} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec2[time.point.special]{Special values} @@ -2226,7 +2306,8 @@ \begin{itemdescr} \pnum -\returns \tcode{time_point(duration::min())}. +\returns +\tcode{time_point(duration::min())}. \end{itemdescr} \indexlibrarymember{max}{time_point}% @@ -2236,7 +2317,8 @@ \begin{itemdescr} \pnum -\returns \tcode{time_point(duration::max())}. +\returns +\tcode{time_point(duration::max())}. \end{itemdescr} \rSec2[time.point.nonmember]{Non-member arithmetic} @@ -2251,7 +2333,8 @@ \begin{itemdescr} \pnum -\returns \tcode{CT(lhs.time_since_epoch() + rhs)}, where \tcode{CT} is the type of the return value. +\returns +\tcode{CT(lhs.time_since_epoch() + rhs)}, where \tcode{CT} is the type of the return value. \end{itemdescr} \indexlibrarymember{operator+}{time_point}% @@ -2264,7 +2347,8 @@ \begin{itemdescr} \pnum -\returns \tcode{rhs + lhs}. +\returns +\tcode{rhs + lhs}. \end{itemdescr} \indexlibrarymember{operator-}{time_point}% @@ -2277,7 +2361,8 @@ \begin{itemdescr} \pnum -\returns \tcode{CT(lhs.time_since_epoch() - rhs)}, +\returns +\tcode{CT(lhs.time_since_epoch() - rhs)}, where \tcode{CT} is the type of the return value. \end{itemdescr} @@ -2290,7 +2375,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.time_since_epoch() - rhs.time_since_epoch()}. +\returns +\tcode{lhs.time_since_epoch() - rhs.time_since_epoch()}. \end{itemdescr} \rSec2[time.point.comparisons]{Comparisons} @@ -2304,7 +2390,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.time_since_epoch() == rhs.time_since_epoch()}. +\returns +\tcode{lhs.time_since_epoch() == rhs.time_since_epoch()}. \end{itemdescr} \indexlibrarymember{operator<}{time_point}% @@ -2316,7 +2403,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.time_since_epoch() < rhs.time_since_epoch()}. +\returns +\tcode{lhs.time_since_epoch() < rhs.time_since_epoch()}. \end{itemdescr} \indexlibrarymember{operator>}{time_point}% @@ -2328,7 +2416,8 @@ \begin{itemdescr} \pnum -\returns \tcode{rhs < lhs}. +\returns +\tcode{rhs < lhs}. \end{itemdescr} \indexlibrarymember{operator<=}{time_point}% @@ -2340,7 +2429,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(rhs < lhs)}. +\returns +\tcode{!(rhs < lhs)}. \end{itemdescr} \indexlibrarymember{operator>=}{time_point}% @@ -2352,7 +2442,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(lhs < rhs)}. +\returns +\tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrarymember{operator>=}{time_point}% @@ -2365,7 +2456,8 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.time_since_epoch() <=> rhs.time_since_epoch()}. +\returns +\tcode{lhs.time_since_epoch() <=> rhs.time_since_epoch()}. \end{itemdescr} \rSec2[time.point.cast]{\tcode{time_point_cast}} @@ -2379,7 +2471,8 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{ToDuration} is a specialization of \tcode{duration}. \pnum @@ -2397,11 +2490,13 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{ToDuration} is a specialization of \tcode{duration}. \pnum -\returns \tcode{time_point(floor(tp.time_since_epoch()))}. +\returns +\tcode{time_point(floor(tp.time_since_epoch()))}. \end{itemdescr} \indexlibrarymember{ceil}{time_point}% @@ -2412,11 +2507,13 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{ToDuration} is a specialization of \tcode{duration}. \pnum -\returns \tcode{time_point(ceil(tp.time_since_epoch()))}. +\returns +\tcode{time_point(ceil(tp.time_since_epoch()))}. \end{itemdescr} \indexlibrarymember{round}{time_point}% @@ -2427,12 +2524,14 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{ToDuration} is a specialization of \tcode{duration}, and \tcode{treat_as_floating_point_v} is \tcode{false}. \pnum -\returns \tcode{time_point(round(tp.time_since_epoch()))}. +\returns +\tcode{time_point(round(tp.time_since_epoch()))}. \end{itemdescr} \rSec1[time.clock]{Clocks} @@ -2502,7 +2601,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{time_t} object that represents the same point in time as \tcode{t} +\returns +A \tcode{time_t} object that represents the same point in time as \tcode{t} when both values are restricted to the coarser of the precisions of \tcode{time_t} and \tcode{time_point}. It is \impldef{whether values are rounded or truncated to the @@ -2517,7 +2617,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{time_point} object that represents the same point in time as \tcode{t} +\returns +A \tcode{time_point} object that represents the same point in time as \tcode{t} when both values are restricted to the coarser of the precisions of \tcode{time_t} and \tcode{time_point}. It is \impldef{whether values are rounded or truncated to the @@ -2569,10 +2670,12 @@ \begin{itemdescr} \pnum -\effects \tcode{os << year_month_day\{dp\}}. +\effects +\tcode{os << year_month_day\{dp\}}. \pnum -\returns \tcode{os}. +\returns +\tcode{os}. \end{itemdescr} \indexlibrarymember{from_stream}{sys_time}% @@ -2586,7 +2689,8 @@ \begin{itemdescr} \pnum -\effects Attempts to parse the input stream \tcode{is} +\effects +Attempts to parse the input stream \tcode{is} into the \tcode{sys_time} \tcode{tp} using the format flags given in the NTCTS \tcode{fmt} as specified in \ref{time.parse}. @@ -2602,7 +2706,8 @@ prior to assigning that difference to \tcode{tp}. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.clock.utc]{Class \tcode{utc_clock}} @@ -2658,7 +2763,8 @@ \begin{itemdescr} \pnum -\returns \tcode{from_sys(system_clock::now())}, or a more accurate value of \tcode{utc_time}. +\returns +\tcode{from_sys(system_clock::now())}, or a more accurate value of \tcode{utc_time}. \end{itemdescr} \indexlibrarymember{to_sys}{utc_clock}% @@ -2783,7 +2889,8 @@ prior to assigning that difference to \tcode{tp}. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \indexlibrary{\idxcode{leap_second_info}}% @@ -2872,7 +2979,8 @@ \begin{itemdescr} \pnum -\returns \tcode{from_utc(utc_clock::now())}, or a more accurate value of \tcode{tai_time}. +\returns +\tcode{from_utc(utc_clock::now())}, or a more accurate value of \tcode{tai_time}. \end{itemdescr} \indexlibrarymember{to_utc}{tai_clock}% @@ -2976,7 +3084,8 @@ the successfully parsed timestamp prior to assigning that difference to \tcode{tp}. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.clock.gps]{Class \tcode{gps_clock}} @@ -3033,7 +3142,8 @@ \begin{itemdescr} \pnum -\returns \tcode{from_utc(utc_clock::now())}, or a more accurate value of \tcode{gps_time}. +\returns +\tcode{from_utc(utc_clock::now())}, or a more accurate value of \tcode{gps_time}. \end{itemdescr} \indexlibrarymember{to_utc}{gps_clock}% @@ -3137,7 +3247,8 @@ the successfully parsed timestamp prior to assigning that difference to \tcode{tp}. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.clock.file]{Type \tcode{file_clock}} @@ -3243,7 +3354,8 @@ the successfully parsed timestamp prior to assigning that difference to \tcode{tp}. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.clock.steady]{Class \tcode{steady_clock}} @@ -3322,7 +3434,8 @@ \end{codeblock} \pnum -\returns \tcode{os}. +\returns +\tcode{os}. \end{itemdescr} \indexlibrarymember{from_stream}{local_time}% @@ -3350,7 +3463,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.clock.cast]{\tcode{time_point} conversions} @@ -3413,7 +3527,8 @@ \begin{itemdescr} \pnum -\returns \tcode{t}. +\returns +\tcode{t}. \end{itemdescr} \begin{codeblock} @@ -3434,7 +3549,8 @@ \begin{itemdescr} \pnum -\returns \tcode{t}. +\returns +\tcode{t}. \end{itemdescr} \begin{codeblock} @@ -3455,7 +3571,8 @@ \begin{itemdescr} \pnum -\returns \tcode{t}. +\returns +\tcode{t}. \end{itemdescr} \rSec3[time.clock.cast.sys.utc]{Conversions between \tcode{system_clock} and \tcode{utc_clock}} @@ -3478,7 +3595,8 @@ \begin{itemdescr} \pnum -\returns \tcode{utc_clock::from_sys(t)}. +\returns +\tcode{utc_clock::from_sys(t)}. \end{itemdescr} \begin{codeblock} @@ -3499,7 +3617,8 @@ \begin{itemdescr} \pnum -\returns \tcode{utc_clock::to_sys(t)}. +\returns +\tcode{utc_clock::to_sys(t)}. \end{itemdescr} \rSec3[time.clock.cast.sys]{Conversions between \tcode{system_clock} and other clocks} @@ -3531,7 +3650,8 @@ the program is ill-formed. \pnum -\returns \tcode{SourceClock::to_sys(t)}. +\returns +\tcode{SourceClock::to_sys(t)}. \end{itemdescr} \begin{codeblock} @@ -3561,7 +3681,8 @@ the program is ill-formed. \pnum -\returns \tcode{DestClock::from_sys(t)}. +\returns +\tcode{DestClock::from_sys(t)}. \end{itemdescr} \rSec3[time.clock.cast.utc]{Conversions between \tcode{utc_clock} and other clocks} @@ -3593,7 +3714,8 @@ the program is ill-formed. \pnum -\returns \tcode{SourceClock::to_utc(t)}. +\returns +\tcode{SourceClock::to_utc(t)}. \end{itemdescr} \begin{codeblock} @@ -3623,7 +3745,8 @@ the program is ill-formed. \pnum -\returns \tcode{DestClock::from_utc(t)}. +\returns +\tcode{DestClock::from_utc(t)}. \end{itemdescr} \rSec3[time.clock.cast.fn]{Function template \tcode{clock_cast}} @@ -3777,10 +3900,12 @@ \begin{itemdescr} \pnum -\effects \tcode{++d_}. +\effects +\tcode{++d_}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator++}{day}% @@ -3790,10 +3915,12 @@ \begin{itemdescr} \pnum -\effects \tcode{++(*this)}. +\effects +\tcode{++(*this)}. \pnum -\returns A copy of \tcode{*this} as it existed on entry to this member function. +\returns +A copy of \tcode{*this} as it existed on entry to this member function. \end{itemdescr} \indexlibrarymember{operator--}{day}% @@ -3803,10 +3930,12 @@ \begin{itemdescr} \pnum -\effects \tcode{--d_}. +\effects +\tcode{--d_}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator--}{day}% @@ -3816,10 +3945,12 @@ \begin{itemdescr} \pnum -\effects \tcode{--(*this)}. +\effects +\tcode{--(*this)}. \pnum -\returns A copy of \tcode{*this} as it existed on entry to this member function. +\returns +A copy of \tcode{*this} as it existed on entry to this member function. \end{itemdescr} \indexlibrarymember{operator+=}{day}% @@ -3829,10 +3960,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + d}. +\effects +\tcode{*this = *this + d}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{day}% @@ -3842,10 +3975,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - d}. +\effects +\tcode{*this = *this - d}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator unsigned}{day}% @@ -3855,7 +3990,8 @@ \begin{itemdescr} \pnum -\returns \tcode{d_}. +\returns +\tcode{d_}. \end{itemdescr} \indexlibrarymember{ok}{day}% @@ -3865,7 +4001,8 @@ \begin{itemdescr} \pnum -\returns \tcode{1 <= d_ \&\& d_ <= 31}. +\returns +\tcode{1 <= d_ \&\& d_ <= 31}. \end{itemdescr} \rSec3[time.cal.day.nonmembers]{Non-member functions} @@ -3877,7 +4014,8 @@ \begin{itemdescr} \pnum -\returns \tcode{unsigned\{x\} == unsigned\{y\}}. +\returns +\tcode{unsigned\{x\} == unsigned\{y\}}. \end{itemdescr} \indexlibrarymember{operator<=>}{day}% @@ -3887,7 +4025,8 @@ \begin{itemdescr} \pnum -\returns \tcode{unsigned\{x\} <=> unsigned\{y\}}. +\returns +\tcode{unsigned\{x\} <=> unsigned\{y\}}. \end{itemdescr} \indexlibrarymember{operator+}{day}% @@ -3897,7 +4036,8 @@ \begin{itemdescr} \pnum -\returns \tcode{day(unsigned\{x\} + y.count())}. +\returns +\tcode{day(unsigned\{x\} + y.count())}. \end{itemdescr} \indexlibrarymember{operator+}{day}% @@ -3907,7 +4047,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y + x}. +\returns +\tcode{y + x}. \end{itemdescr} \indexlibrarymember{operator-}{day}% @@ -3917,7 +4058,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x + -y}. +\returns +\tcode{x + -y}. \end{itemdescr} \indexlibrarymember{operator-}{day}% @@ -3927,7 +4069,8 @@ \begin{itemdescr} \pnum -\returns \tcode{days\{int(unsigned\{x\}) - int(unsigned\{y\})}. +\returns +\tcode{days\{int(unsigned\{x\}) - int(unsigned\{y\})}. \end{itemdescr} \indexlibrarymember{operator<<}{day}% @@ -3973,7 +4116,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \indexlibrarymember{operator""""d}{day}% @@ -3983,7 +4127,8 @@ \begin{itemdescr} \pnum -\returns \tcode{day\{static_cast(d)\}}. +\returns +\tcode{day\{static_cast(d)\}}. \end{itemdescr} \rSec2[time.cal.month]{Class \tcode{month}} @@ -4049,10 +4194,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this += months\{1\}}. +\effects +\tcode{*this += months\{1\}}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator++}{month}% @@ -4062,10 +4209,12 @@ \begin{itemdescr} \pnum -\effects \tcode{++(*this)}. +\effects +\tcode{++(*this)}. \pnum -\returns A copy of \tcode{*this} as it existed on entry to this member function. +\returns +A copy of \tcode{*this} as it existed on entry to this member function. \end{itemdescr} \indexlibrarymember{operator--}{month}% @@ -4075,10 +4224,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this -= months\{1\}}. +\effects +\tcode{*this -= months\{1\}}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator--}{month}% @@ -4088,10 +4239,12 @@ \begin{itemdescr} \pnum -\effects \tcode{--(*this)}. +\effects +\tcode{--(*this)}. \pnum -\returns A copy of \tcode{*this} as it existed on entry to this member function. +\returns +A copy of \tcode{*this} as it existed on entry to this member function. \end{itemdescr} \indexlibrarymember{operator+=}{month}% @@ -4101,10 +4254,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + m}. +\effects +\tcode{*this = *this + m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{month}% @@ -4114,10 +4269,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - m}. +\effects +\tcode{*this = *this - m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator unsigned}{month}% @@ -4127,7 +4284,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{ok}{month}% @@ -4137,7 +4295,8 @@ \begin{itemdescr} \pnum -\returns \tcode{1 <= m_ \&\& m_ <= 12}. +\returns +\tcode{1 <= m_ \&\& m_ <= 12}. \end{itemdescr} \rSec3[time.cal.month.nonmembers]{Non-member functions} @@ -4149,7 +4308,8 @@ \begin{itemdescr} \pnum -\returns \tcode{unsigned\{x\} == unsigned\{y\}}. +\returns +\tcode{unsigned\{x\} == unsigned\{y\}}. \end{itemdescr} \indexlibrarymember{operator<=>}{month}% @@ -4159,7 +4319,8 @@ \begin{itemdescr} \pnum -\returns \tcode{unsigned\{x\} <=> unsigned\{y\}}. +\returns +\tcode{unsigned\{x\} <=> unsigned\{y\}}. \end{itemdescr} \indexlibrarymember{operator+}{month}% @@ -4192,7 +4353,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y + x}. +\returns +\tcode{y + x}. \end{itemdescr} \indexlibrarymember{operator-}{month}% @@ -4202,7 +4364,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x + -y}. +\returns +\tcode{x + -y}. \end{itemdescr} \indexlibrarymember{operator-}{month}% @@ -4268,7 +4431,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.cal.year]{Class \tcode{year}} @@ -4341,10 +4505,12 @@ \begin{itemdescr} \pnum -\effects \tcode{++y_}. +\effects +\tcode{++y_}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator++}{year}% @@ -4354,10 +4520,12 @@ \begin{itemdescr} \pnum -\effects \tcode{++(*this)}. +\effects +\tcode{++(*this)}. \pnum -\returns A copy of \tcode{*this} as it existed on entry to this member function. +\returns +A copy of \tcode{*this} as it existed on entry to this member function. \end{itemdescr} \indexlibrarymember{operator--}{year}% @@ -4367,10 +4535,12 @@ \begin{itemdescr} \pnum -\effects \tcode{--y_}. +\effects +\tcode{--y_}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator--}{year}% @@ -4380,10 +4550,12 @@ \begin{itemdescr} \pnum -\effects \tcode{--(*this)}. +\effects +\tcode{--(*this)}. \pnum -\returns A copy of \tcode{*this} as it existed on entry to this member function. +\returns +A copy of \tcode{*this} as it existed on entry to this member function. \end{itemdescr} \indexlibrarymember{operator+=}{year}% @@ -4393,10 +4565,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + y}. +\effects +\tcode{*this = *this + y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year}% @@ -4406,10 +4580,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - y}. +\effects +\tcode{*this = *this - y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator+}{year}% @@ -4419,7 +4595,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-}{year}% @@ -4429,7 +4606,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year\{-y_\}}. +\returns +\tcode{year\{-y_\}}. \end{itemdescr} \indexlibrarymember{is_leap}{year}% @@ -4439,7 +4617,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_ \% 4 == 0 \&\& (y_ \% 100 != 0 || y_ \% 400 == 0)}. +\returns +\tcode{y_ \% 4 == 0 \&\& (y_ \% 100 != 0 || y_ \% 400 == 0)}. \end{itemdescr} \indexlibrarymember{operator int}{year}% @@ -4449,7 +4628,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_}. +\returns +\tcode{y_}. \end{itemdescr} \indexlibrarymember{ok}{year}% @@ -4459,7 +4639,8 @@ \begin{itemdescr} \pnum -\returns \tcode{min().y_ <= y_ \&\& y_ <= max().y_}. +\returns +\tcode{min().y_ <= y_ \&\& y_ <= max().y_}. \end{itemdescr} \indexlibrarymember{min}{year}% @@ -4469,7 +4650,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year\{-32767\}}. +\returns +\tcode{year\{-32767\}}. \end{itemdescr} \indexlibrarymember{max}{year}% @@ -4479,7 +4661,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year\{32767\}}. +\returns +\tcode{year\{32767\}}. \end{itemdescr} \rSec3[time.cal.year.nonmembers]{Non-member functions} @@ -4491,7 +4674,8 @@ \begin{itemdescr} \pnum -\returns \tcode{int\{x\} == int\{y\}}. +\returns +\tcode{int\{x\} == int\{y\}}. \end{itemdescr} \indexlibrarymember{operator<=>}{year}% @@ -4501,7 +4685,8 @@ \begin{itemdescr} \pnum -\returns \tcode{int\{x\} <=> int\{y\}}. +\returns +\tcode{int\{x\} <=> int\{y\}}. \end{itemdescr} \indexlibrarymember{operator+}{year}% @@ -4511,7 +4696,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year\{int\{x\} + y.count()\}}. +\returns +\tcode{year\{int\{x\} + y.count()\}}. \end{itemdescr} \indexlibrarymember{operator+}{year}% @@ -4521,7 +4707,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y + x}. +\returns +\tcode{y + x}. \end{itemdescr} \indexlibrarymember{operator-}{year}% @@ -4531,7 +4718,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x + -y}. +\returns +\tcode{x + -y}. \end{itemdescr} \indexlibrarymember{operator-}{year}% @@ -4541,7 +4729,8 @@ \begin{itemdescr} \pnum -\returns \tcode{years\{int\{x\} - int\{y\}\}}. +\returns +\tcode{years\{int\{x\} - int\{y\}\}}. \end{itemdescr} \indexlibrarymember{operator<<}{year}% @@ -4587,7 +4776,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \indexlibrarymember{operator""""y}{year}% @@ -4597,7 +4787,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year\{static_cast(y)\}}. +\returns +\tcode{year\{static_cast(y)\}}. \end{itemdescr} \rSec2[time.cal.wd]{Class \tcode{weekday}} @@ -4712,10 +4903,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this += days\{1\}}. +\effects +\tcode{*this += days\{1\}}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator++}{weekday}% @@ -4725,10 +4918,12 @@ \begin{itemdescr} \pnum -\effects \tcode{++(*this)}. +\effects +\tcode{++(*this)}. \pnum -\returns A copy of \tcode{*this} as it existed on entry to this member function. +\returns +A copy of \tcode{*this} as it existed on entry to this member function. \end{itemdescr} \indexlibrarymember{operator--}{weekday}% @@ -4738,10 +4933,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this -= days\{1\}}. +\effects +\tcode{*this -= days\{1\}}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator--}{weekday}% @@ -4751,10 +4948,12 @@ \begin{itemdescr} \pnum -\effects \tcode{--(*this)}. +\effects +\tcode{--(*this)}. \pnum -\returns A copy of \tcode{*this} as it existed on entry to this member function. +\returns +A copy of \tcode{*this} as it existed on entry to this member function. \end{itemdescr} \indexlibrarymember{operator+=}{weekday}% @@ -4764,10 +4963,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + d}. +\effects +\tcode{*this = *this + d}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{weekday}% @@ -4777,10 +4978,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - d}. +\effects +\tcode{*this = *this - d}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{c_encoding}{weekday}% @@ -4790,7 +4993,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wd_}. +\returns +\tcode{wd_}. \end{itemdescr} \indexlibrarymember{iso_encoding}{weekday}% @@ -4800,7 +5004,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wd_ == 0u ?\ 7u :\ wd_}. +\returns +\tcode{wd_ == 0u ?\ 7u :\ wd_}. \end{itemdescr} \indexlibrarymember{ok}{weekday}% @@ -4810,7 +5015,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wd_ <= 6}. +\returns +\tcode{wd_ <= 6}. \end{itemdescr} \indexlibrarymember{operator[]}{weekday}% @@ -4820,7 +5026,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{*this, index\}}. +\returns +\tcode{\{*this, index\}}. \end{itemdescr} \indexlibrarymember{operator[]}{weekday}% @@ -4830,7 +5037,8 @@ \begin{itemdescr} \pnum -\returns \tcode{weekday_last\{*this\}}. +\returns +\tcode{weekday_last\{*this\}}. \end{itemdescr} \rSec3[time.cal.wd.nonmembers]{Non-member functions} @@ -4842,7 +5050,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.wd_ == y.wd_}. +\returns +\tcode{x.wd_ == y.wd_}. \end{itemdescr} \indexlibrarymember{operator+}{weekday}% @@ -4875,7 +5084,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y + x}. +\returns +\tcode{y + x}. \end{itemdescr} \indexlibrarymember{operator-}{weekday}% @@ -4885,7 +5095,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x + -y}. +\returns +\tcode{x + -y}. \end{itemdescr} \indexlibrarymember{operator-}{weekday}% @@ -4951,7 +5162,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.cal.wdidx]{Class \tcode{weekday_indexed}} @@ -5021,7 +5233,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wd_}. +\returns +\tcode{wd_}. \end{itemdescr} \indexlibrarymember{index}{weekday_indexed}% @@ -5031,7 +5244,8 @@ \begin{itemdescr} \pnum -\returns \tcode{index_}. +\returns +\tcode{index_}. \end{itemdescr} \indexlibrarymember{ok}{weekday_indexed}% @@ -5041,7 +5255,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wd_.ok() \&\& 1 <= index_ \&\& index_ <= 5}. +\returns +\tcode{wd_.ok() \&\& 1 <= index_ \&\& index_ <= 5}. \end{itemdescr} \rSec3[time.cal.wdidx.nonmembers]{Non-member functions} @@ -5053,7 +5268,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.weekday() == y.weekday() \&\& x.index() == y.index()}. +\returns +\tcode{x.weekday() == y.weekday() \&\& x.index() == y.index()}. \end{itemdescr} \indexlibrarymember{operator<<}{weekday_indexed}% @@ -5134,7 +5350,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wd_}. +\returns +\tcode{wd_}. \end{itemdescr} \indexlibrarymember{ok}{weekday_last}% @@ -5144,7 +5361,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wd_.ok()}. +\returns +\tcode{wd_.ok()}. \end{itemdescr} \rSec3[time.cal.wdlast.nonmembers]{Non-member functions} @@ -5156,7 +5374,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.weekday() == y.weekday()}. +\returns +\tcode{x.weekday() == y.weekday()}. \end{itemdescr} \indexlibrarymember{operator<<}{weekday_last}% @@ -5227,7 +5446,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{day}{month_day}% @@ -5237,7 +5457,8 @@ \begin{itemdescr} \pnum -\returns \tcode{d_}. +\returns +\tcode{d_}. \end{itemdescr} \indexlibrarymember{ok}{month_day}% @@ -5266,7 +5487,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.month() == y.month() \&\& x.day() == y.day()}. +\returns +\tcode{x.month() == y.month() \&\& x.day() == y.day()}. \end{itemdescr} \indexlibrarymember{operator<=>}{month_day}% @@ -5326,7 +5548,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.cal.mdlast]{Class \tcode{month_day_last}} @@ -5384,7 +5607,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{ok}{month_day_last}% @@ -5394,7 +5618,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_.ok()}. +\returns +\tcode{m_.ok()}. \end{itemdescr} \indexlibrarymember{operator==}{month_day_last}% @@ -5404,7 +5629,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.month() == y.month()}. +\returns +\tcode{x.month() == y.month()}. \end{itemdescr} \indexlibrarymember{operator<=>}{month_day_last}% @@ -5414,7 +5640,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.month() <=> y.month()}. +\returns +\tcode{x.month() <=> y.month()}. \end{itemdescr} \indexlibrarymember{operator<<}{month_day_last}% @@ -5492,7 +5719,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{weekday_indexed}{month_weekday}% @@ -5502,7 +5730,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wdi_}. +\returns +\tcode{wdi_}. \end{itemdescr} \indexlibrarymember{ok}{month_weekday}% @@ -5512,7 +5741,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_.ok() \&\& wdi_.ok()}. +\returns +\tcode{m_.ok() \&\& wdi_.ok()}. \end{itemdescr} \rSec3[time.cal.mwd.nonmembers]{Non-member functions} @@ -5524,7 +5754,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.month() == y.month() \&\& x.weekday_indexed() == y.weekday_indexed()}. +\returns +\tcode{x.month() == y.month() \&\& x.weekday_indexed() == y.weekday_indexed()}. \end{itemdescr} \indexlibrarymember{operator<<}{month_weekday}% @@ -5605,7 +5836,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{weekday_last}{month_weekday_last}% @@ -5615,7 +5847,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wdl_}. +\returns +\tcode{wdl_}. \end{itemdescr} \indexlibrarymember{ok}{month_weekday_last}% @@ -5625,7 +5858,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_.ok() \&\& wdl_.ok()}. +\returns +\tcode{m_.ok() \&\& wdl_.ok()}. \end{itemdescr} \rSec3[time.cal.mwdlast.nonmembers]{Non-member functions} @@ -5637,7 +5871,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.month() == y.month() \&\& x.weekday_last() == y.weekday_last()}. +\returns +\tcode{x.month() == y.month() \&\& x.weekday_last() == y.weekday_last()}. \end{itemdescr} \indexlibrarymember{operator<<}{month_weekday_last}% @@ -5716,7 +5951,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_}. +\returns +\tcode{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month}% @@ -5726,7 +5962,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month}% @@ -5736,10 +5973,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + dm}. +\effects +\tcode{*this = *this + dm}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month}% @@ -5749,10 +5988,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - dm}. +\effects +\tcode{*this = *this - dm}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month}% @@ -5762,10 +6003,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + dy}. +\effects +\tcode{*this = *this + dy}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month}% @@ -5775,10 +6018,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - dy}. +\effects +\tcode{*this = *this - dy}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{ok}{year_month}% @@ -5788,7 +6033,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_.ok() \&\& m_.ok()}. +\returns +\tcode{y_.ok() \&\& m_.ok()}. \end{itemdescr} \rSec3[time.cal.ym.nonmembers]{Non-member functions} @@ -5800,7 +6046,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.year() == y.year() \&\& x.month() == y.month()}. +\returns +\tcode{x.year() == y.year() \&\& x.month() == y.month()}. \end{itemdescr} \indexlibrarymember{operator<=>}{year_month}% @@ -5825,7 +6072,8 @@ \begin{itemdescr} \pnum -\returns A \tcode{year_month} value \tcode{z} such that \tcode{z - ym == dm}. +\returns +A \tcode{year_month} value \tcode{z} such that \tcode{z - ym == dm}. \pnum \complexity @@ -5839,7 +6087,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ym + dm}. +\returns +\tcode{ym + dm}. \end{itemdescr} \indexlibrarymember{operator-}{year_month}% @@ -5849,7 +6098,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ym + -dm}. +\returns +\tcode{ym + -dm}. \end{itemdescr} \indexlibrarymember{operator-}{year_month}% @@ -5873,7 +6123,8 @@ \begin{itemdescr} \pnum -\returns \tcode{(ym.year() + dy) / ym.month()}. +\returns +\tcode{(ym.year() + dy) / ym.month()}. \end{itemdescr} \indexlibrarymember{operator+}{year_month}% @@ -5883,7 +6134,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ym + dy}. +\returns +\tcode{ym + dy}. \end{itemdescr} \indexlibrarymember{operator-}{year_month}% @@ -5893,7 +6145,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ym + -dy}. +\returns +\tcode{ym + -dy}. \end{itemdescr} \indexlibrarymember{operator<<}{year_month}% @@ -5938,7 +6191,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.cal.ymd]{Class \tcode{year_month_day}} @@ -6072,10 +6326,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + m}. +\effects +\tcode{*this = *this + m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month_day}% @@ -6085,10 +6341,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - m}. +\effects +\tcode{*this = *this - m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month_day}% @@ -6098,10 +6356,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + y}. +\effects +\tcode{*this = *this + y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month_day}% @@ -6111,10 +6371,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - y}. +\effects +\tcode{*this = *this - y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{year}{year_month_day}% @@ -6124,7 +6386,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_}. +\returns +\tcode{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month_day}% @@ -6134,7 +6397,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{day}{year_month_day}% @@ -6144,7 +6408,8 @@ \begin{itemdescr} \pnum -\returns \tcode{d_}. +\returns +\tcode{d_}. \end{itemdescr} \indexlibrarymember{operator sys_days}{year_month_day}% @@ -6186,7 +6451,8 @@ \begin{itemdescr} \pnum -\returns \tcode{local_days\{sys_days\{*this\}.time_since_epoch()\}}. +\returns +\tcode{local_days\{sys_days\{*this\}.time_since_epoch()\}}. \end{itemdescr} \indexlibrarymember{ok}{year_month_day}% @@ -6212,7 +6478,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.year() == y.year() \&\& x.month() == y.month() \&\& x.day() == y.day()}. +\returns +\tcode{x.year() == y.year() \&\& x.month() == y.month() \&\& x.day() == y.day()}. \end{itemdescr} \indexlibrarymember{operator<=>}{year_month_day}% @@ -6238,7 +6505,8 @@ \begin{itemdescr} \pnum -\returns \tcode{(ymd.year() / ymd.month() + dm) / ymd.day()}. +\returns +\tcode{(ymd.year() / ymd.month() + dm) / ymd.day()}. \pnum \begin{note} @@ -6255,7 +6523,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymd + dm}. +\returns +\tcode{ymd + dm}. \end{itemdescr} \indexlibrarymember{operator-}{year_month_day}% @@ -6265,7 +6534,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymd + (-dm)}. +\returns +\tcode{ymd + (-dm)}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_day}% @@ -6275,7 +6545,8 @@ \begin{itemdescr} \pnum -\returns \tcode{(ymd.year() + dy) / ymd.month() / ymd.day()}. +\returns +\tcode{(ymd.year() + dy) / ymd.month() / ymd.day()}. \pnum \begin{note} @@ -6293,7 +6564,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymd + dy}. +\returns +\tcode{ymd + dy}. \end{itemdescr} \indexlibrarymember{operator-}{year_month_day}% @@ -6303,7 +6575,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymd + (-dy)}. +\returns +\tcode{ymd + (-dy)}. \end{itemdescr} \indexlibrarymember{operator<<}{year_month_day}% @@ -6349,7 +6622,8 @@ that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum -\returns \tcode{is}. +\returns +\tcode{is}. \end{itemdescr} \rSec2[time.cal.ymdlast]{Class \tcode{year_month_day_last}} @@ -6422,10 +6696,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + m}. +\effects +\tcode{*this = *this + m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month_day_last}% @@ -6435,10 +6711,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - m}. +\effects +\tcode{*this = *this - m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month_day_last}% @@ -6448,10 +6726,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + y}. +\effects +\tcode{*this = *this + y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month_day_last}% @@ -6461,10 +6741,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - y}. +\effects +\tcode{*this = *this - y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{year}{year_month_day_last}% @@ -6474,7 +6756,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_}. +\returns +\tcode{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month_day_last}% @@ -6484,7 +6767,8 @@ \begin{itemdescr} \pnum -\returns \tcode{mdl_.month()}. +\returns +\tcode{mdl_.month()}. \end{itemdescr} \indexlibrarymember{month_day_last}{year_month_day_last}% @@ -6494,7 +6778,8 @@ \begin{itemdescr} \pnum -\returns \tcode{mdl_}. +\returns +\tcode{mdl_}. \end{itemdescr} \indexlibrarymember{day}{year_month_day_last}% @@ -6521,7 +6806,8 @@ \begin{itemdescr} \pnum -\returns \tcode{sys_days\{year()/month()/day()\}}. +\returns +\tcode{sys_days\{year()/month()/day()\}}. \end{itemdescr} \indexlibrarymember{operator local_days}{year_month_day_last}% @@ -6531,7 +6817,8 @@ \begin{itemdescr} \pnum -\returns \tcode{local_days\{sys_days\{*this\}.time_since_epoch()\}}. +\returns +\tcode{local_days\{sys_days\{*this\}.time_since_epoch()\}}. \end{itemdescr} \indexlibrarymember{ok}{year_month_day_last}% @@ -6541,7 +6828,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_.ok() \&\& mdl_.ok()}. +\returns +\tcode{y_.ok() \&\& mdl_.ok()}. \end{itemdescr} \rSec3[time.cal.ymdlast.nonmembers]{Non-member functions} @@ -6553,7 +6841,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.year() == y.year() \&\& x.month_day_last() == y.month_day_last()}. +\returns +\tcode{x.year() == y.year() \&\& x.month_day_last() == y.month_day_last()}. \end{itemdescr} \indexlibrarymember{operator<=>}{year_month_day_last}% @@ -6580,7 +6869,8 @@ \begin{itemdescr} \pnum -\returns \tcode{(ymdl.year() / ymdl.month() + dm) / last}. +\returns +\tcode{(ymdl.year() / ymdl.month() + dm) / last}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_day_last}% @@ -6591,7 +6881,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymdl + dm}. +\returns +\tcode{ymdl + dm}. \end{itemdescr} \indexlibrarymember{operator-}{year_month_day_last}% @@ -6602,7 +6893,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymdl + (-dm)}. +\returns +\tcode{ymdl + (-dm)}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_day_last}% @@ -6613,7 +6905,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{ymdl.year()+dy, ymdl.month_day_last()\}}. +\returns +\tcode{\{ymdl.year()+dy, ymdl.month_day_last()\}}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_day_last}% @@ -6624,7 +6917,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymdl + dy}. +\returns +\tcode{ymdl + dy}. \end{itemdescr} \indexlibrarymember{operator-}{year_month_day_last}% @@ -6635,7 +6929,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymdl + (-dy)}. +\returns +\tcode{ymdl + (-dy)}. \end{itemdescr} \indexlibrarymember{operator<<}{year_month_day_last}% @@ -6763,10 +7058,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + m}. +\effects +\tcode{*this = *this + m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month_weekday}% @@ -6776,10 +7073,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - m}. +\effects +\tcode{*this = *this - m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month_weekday}% @@ -6789,10 +7088,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + y}. +\effects +\tcode{*this = *this + y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month_weekday}% @@ -6802,10 +7103,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - y}. +\effects +\tcode{*this = *this - y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{year}{year_month_weekday}% @@ -6815,7 +7118,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_}. +\returns +\tcode{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month_weekday}% @@ -6825,7 +7129,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{weekday}{year_month_weekday}% @@ -6835,7 +7140,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wdi_.weekday()}. +\returns +\tcode{wdi_.weekday()}. \end{itemdescr} \indexlibrarymember{index}{year_month_weekday}% @@ -6845,7 +7151,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wdi_.index()}. +\returns +\tcode{wdi_.index()}. \end{itemdescr} \indexlibrarymember{weekday_indexed}{year_month_weekday}% @@ -6855,7 +7162,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wdi_}. +\returns +\tcode{wdi_}. \end{itemdescr} \indexlibrarymember{operator sys_days}{year_month_weekday}% @@ -6884,7 +7192,8 @@ \begin{itemdescr} \pnum -\returns \tcode{local_days\{sys_days\{*this\}.time_since_epoch()\}}. +\returns +\tcode{local_days\{sys_days\{*this\}.time_since_epoch()\}}. \end{itemdescr} \indexlibrarymember{ok}{year_month_weekday}% @@ -6927,7 +7236,8 @@ \begin{itemdescr} \pnum -\returns \tcode{(ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed()}. +\returns +\tcode{(ymwd.year() / ymwd.month() + dm) / ymwd.weekday_indexed()}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_weekday}% @@ -6937,7 +7247,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymwd + dm}. +\returns +\tcode{ymwd + dm}. \end{itemdescr} \indexlibrarymember{operator-}{year_month_weekday}% @@ -6947,7 +7258,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymwd + (-dm)}. +\returns +\tcode{ymwd + (-dm)}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_weekday}% @@ -6957,7 +7269,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{ymwd.year()+dy, ymwd.month(), ymwd.weekday_indexed()\}}. +\returns +\tcode{\{ymwd.year()+dy, ymwd.month(), ymwd.weekday_indexed()\}}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_weekday}% @@ -6967,7 +7280,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymwd + dy}. +\returns +\tcode{ymwd + dy}. \end{itemdescr} \indexlibrarymember{operator-}{year_month_weekday}% @@ -6977,7 +7291,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymwd + (-dy)}. +\returns +\tcode{ymwd + (-dy)}. \end{itemdescr} \indexlibrarymember{operator<<}{year_month_weekday}% @@ -7068,10 +7383,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + m}. +\effects +\tcode{*this = *this + m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month_weekday_last}% @@ -7081,10 +7398,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - m}. +\effects +\tcode{*this = *this - m}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month_weekday_last}% @@ -7094,10 +7413,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this + y}. +\effects +\tcode{*this = *this + y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator-=}{year_month_weekday_last}% @@ -7107,10 +7428,12 @@ \begin{itemdescr} \pnum -\effects \tcode{*this = *this - y}. +\effects +\tcode{*this = *this - y}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{year}{year_month_weekday_last}% @@ -7120,7 +7443,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_}. +\returns +\tcode{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month_weekday_last}% @@ -7130,7 +7454,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m_}. +\returns +\tcode{m_}. \end{itemdescr} \indexlibrarymember{weekday}{year_month_weekday_last}% @@ -7140,7 +7465,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wdl_.weekday()}. +\returns +\tcode{wdl_.weekday()}. \end{itemdescr} \indexlibrarymember{weekday_last}{year_month_weekday_last}% @@ -7150,7 +7476,8 @@ \begin{itemdescr} \pnum -\returns \tcode{wdl_}. +\returns +\tcode{wdl_}. \end{itemdescr} \indexlibrarymember{operator sys_days}{year_month_weekday_last}% @@ -7174,7 +7501,8 @@ \begin{itemdescr} \pnum -\returns \tcode{local_days\{sys_days\{*this\}.time_since_epoch()\}}. +\returns +\tcode{local_days\{sys_days\{*this\}.time_since_epoch()\}}. \end{itemdescr} \indexlibrarymember{ok}{year_month_weekday_last}% @@ -7184,7 +7512,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y_.ok() \&\& m_.ok() \&\& wdl_.ok()}. +\returns +\tcode{y_.ok() \&\& m_.ok() \&\& wdl_.ok()}. \end{itemdescr} \rSec3[time.cal.ymwdlast.nonmembers]{Non-member functions} @@ -7211,7 +7540,8 @@ \begin{itemdescr} \pnum -\returns \tcode{(ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last()}. +\returns +\tcode{(ymwdl.year() / ymwdl.month() + dm) / ymwdl.weekday_last()}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_weekday_last}% @@ -7222,7 +7552,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymwdl + dm}. +\returns +\tcode{ymwdl + dm}. \end{itemdescr} \indexlibrarymember{operator-}{year_month_weekday_last}% @@ -7233,7 +7564,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymwdl + (-dm)}. +\returns +\tcode{ymwdl + (-dm)}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_weekday_last}% @@ -7244,7 +7576,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{ymwdl.year()+dy, ymwdl.month(), ymwdl.weekday_last()\}}. +\returns +\tcode{\{ymwdl.year()+dy, ymwdl.month(), ymwdl.weekday_last()\}}. \end{itemdescr} \indexlibrarymember{operator+}{year_month_weekday_last}% @@ -7255,7 +7588,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymwdl + dy}. +\returns +\tcode{ymwdl + dy}. \end{itemdescr} \indexlibrarymember{operator-}{year_month_weekday_last}% @@ -7266,7 +7600,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ymwdl + (-dy)}. +\returns +\tcode{ymwdl + (-dy)}. \end{itemdescr} \indexlibrarymember{operator<<}{year_month_weekday_last}% @@ -7342,7 +7677,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{y, m\}}. +\returns +\tcode{\{y, m\}}. \end{itemdescr} \begin{itemdecl} @@ -7352,7 +7688,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y / month(m)}. +\returns +\tcode{y / month(m)}. \end{itemdescr} \begin{itemdecl} @@ -7362,7 +7699,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{m, d\}}. +\returns +\tcode{\{m, d\}}. \end{itemdescr} \begin{itemdecl} @@ -7372,7 +7710,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m / day(d)}. +\returns +\tcode{m / day(d)}. \end{itemdescr} \begin{itemdecl} @@ -7382,7 +7721,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month(m) / d}. +\returns +\tcode{month(m) / d}. \end{itemdescr} \begin{itemdecl} @@ -7392,7 +7732,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m / d}. +\returns +\tcode{m / d}. \end{itemdescr} \begin{itemdecl} @@ -7402,7 +7743,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month(m) / d}. +\returns +\tcode{month(m) / d}. \end{itemdescr} \begin{itemdecl} @@ -7412,7 +7754,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month_day_last\{m\}}. +\returns +\tcode{month_day_last\{m\}}. \end{itemdescr} \begin{itemdecl} @@ -7422,7 +7765,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month(m) / last}. +\returns +\tcode{month(m) / last}. \end{itemdescr} \begin{itemdecl} @@ -7432,7 +7776,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m / last}. +\returns +\tcode{m / last}. \end{itemdescr} \begin{itemdecl} @@ -7442,7 +7787,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month(m) / last}. +\returns +\tcode{month(m) / last}. \end{itemdescr} \begin{itemdecl} @@ -7452,7 +7798,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{m, wdi\}}. +\returns +\tcode{\{m, wdi\}}. \end{itemdescr} \begin{itemdecl} @@ -7462,7 +7809,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month(m) / wdi}. +\returns +\tcode{month(m) / wdi}. \end{itemdescr} \begin{itemdecl} @@ -7472,7 +7820,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m / wdi}. +\returns +\tcode{m / wdi}. \end{itemdescr} \begin{itemdecl} @@ -7482,7 +7831,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month(m) / wdi}. +\returns +\tcode{month(m) / wdi}. \end{itemdescr} \begin{itemdecl} @@ -7492,7 +7842,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{m, wdl\}}. +\returns +\tcode{\{m, wdl\}}. \end{itemdescr} \begin{itemdecl} @@ -7502,7 +7853,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month(m) / wdl}. +\returns +\tcode{month(m) / wdl}. \end{itemdescr} \begin{itemdecl} @@ -7512,7 +7864,8 @@ \begin{itemdescr} \pnum -\returns \tcode{m / wdl}. +\returns +\tcode{m / wdl}. \end{itemdescr} \begin{itemdecl} @@ -7522,7 +7875,8 @@ \begin{itemdescr} \pnum -\returns \tcode{month(m) / wdl}. +\returns +\tcode{month(m) / wdl}. \end{itemdescr} \begin{itemdecl} @@ -7532,7 +7886,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{ym.year(), ym.month(), d\}}. +\returns +\tcode{\{ym.year(), ym.month(), d\}}. \end{itemdescr} \begin{itemdecl} @@ -7542,7 +7897,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ym / day(d)}. +\returns +\tcode{ym / day(d)}. \end{itemdescr} \begin{itemdecl} @@ -7552,7 +7908,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y / md.month() / md.day()}. +\returns +\tcode{y / md.month() / md.day()}. \end{itemdescr} \begin{itemdecl} @@ -7562,7 +7919,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year(y) / md}. +\returns +\tcode{year(y) / md}. \end{itemdescr} \begin{itemdecl} @@ -7572,7 +7930,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y / md}. +\returns +\tcode{y / md}. \end{itemdescr} \begin{itemdecl} @@ -7582,7 +7941,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year(y) / md}. +\returns +\tcode{year(y) / md}. \end{itemdescr} \begin{itemdecl} @@ -7592,7 +7952,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{ym.year(), month_day_last\{ym.month()\}\}}. +\returns +\tcode{\{ym.year(), month_day_last\{ym.month()\}\}}. \end{itemdescr} \begin{itemdecl} @@ -7602,7 +7963,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{y, mdl\}}. +\returns +\tcode{\{y, mdl\}}. \end{itemdescr} \begin{itemdecl} @@ -7612,7 +7974,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year(y) / mdl}. +\returns +\tcode{year(y) / mdl}. \end{itemdescr} \begin{itemdecl} @@ -7622,7 +7985,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y / mdl}. +\returns +\tcode{y / mdl}. \end{itemdescr} \begin{itemdecl} @@ -7632,7 +7996,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year(y) / mdl}. +\returns +\tcode{year(y) / mdl}. \end{itemdescr} \begin{itemdecl} @@ -7642,7 +8007,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{ym.year(), ym.month(), wdi\}}. +\returns +\tcode{\{ym.year(), ym.month(), wdi\}}. \end{itemdescr} \begin{itemdecl} @@ -7652,7 +8018,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{y, mwd.month(), mwd.weekday_indexed()\}}. +\returns +\tcode{\{y, mwd.month(), mwd.weekday_indexed()\}}. \end{itemdescr} \begin{itemdecl} @@ -7662,7 +8029,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year(y) / mwd}. +\returns +\tcode{year(y) / mwd}. \end{itemdescr} \begin{itemdecl} @@ -7672,7 +8040,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y / mwd}. +\returns +\tcode{y / mwd}. \end{itemdescr} \begin{itemdecl} @@ -7682,7 +8051,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year(y) / mwd}. +\returns +\tcode{year(y) / mwd}. \end{itemdescr} \begin{itemdecl} @@ -7692,7 +8062,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{ym.year(), ym.month(), wdl\}}. +\returns +\tcode{\{ym.year(), ym.month(), wdl\}}. \end{itemdescr} \begin{itemdecl} @@ -7702,7 +8073,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{y, mwdl.month(), mwdl.weekday_last()\}}. +\returns +\tcode{\{y, mwdl.month(), mwdl.weekday_last()\}}. \end{itemdescr} \begin{itemdecl} @@ -7712,7 +8084,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year(y) / mwdl}. +\returns +\tcode{year(y) / mwdl}. \end{itemdescr} \begin{itemdecl} @@ -7722,7 +8095,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y / mwdl}. +\returns +\tcode{y / mwdl}. \end{itemdescr} \begin{itemdecl} @@ -7732,7 +8106,8 @@ \begin{itemdescr} \pnum -\returns \tcode{year(y) / mwdl}. +\returns +\tcode{year(y) / mwdl}. \end{itemdescr} \indexlibrary{\idxcode{operator/}!calendar types|)} @@ -8244,7 +8619,8 @@ \end{note} \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{begin}{tzdb_list}% @@ -8276,7 +8652,8 @@ \begin{itemdescr} \pnum -\returns \tcode{begin()}. +\returns +\tcode{begin()}. \end{itemdescr} \indexlibrarymember{cend}{tzdb_list}% @@ -8286,7 +8663,8 @@ \begin{itemdescr} \pnum -\returns \tcode{end()}. +\returns +\tcode{end()}. \end{itemdescr} \rSec3[time.zone.db.access]{Time zone database access} @@ -8327,7 +8705,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get_tzdb_list().front()}. +\returns +\tcode{get_tzdb_list().front()}. \end{itemdescr} \indexlibrary{\idxcode{locate_zone}}% @@ -8337,7 +8716,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get_tzdb().locate_zone(tz_name)}. +\returns +\tcode{get_tzdb().locate_zone(tz_name)}. \pnum \begin{note} @@ -8353,7 +8733,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get_tzdb().current_zone()}. +\returns +\tcode{get_tzdb().current_zone()}. \end{itemdescr} \rSec3[time.zone.db.remote]{Remote time zone database support} @@ -8387,7 +8768,8 @@ accessed by \tcode{get_tzdb_list()}. \pnum -\returns \tcode{get_tzdb_list().front()}. +\returns +\tcode{get_tzdb_list().front()}. \pnum \remarks @@ -8411,7 +8793,8 @@ \begin{itemdescr} \pnum -\returns The latest remote database version. +\returns +The latest remote database version. \begin{note} This can be compared with \tcode{get_tzdb().version} @@ -8787,7 +9170,8 @@ \begin{itemdescr} \pnum -\returns The name of the \tcode{time_zone}. +\returns +The name of the \tcode{time_zone}. \pnum \begin{example} @@ -8887,7 +9271,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.name() == y.name()}. +\returns +\tcode{x.name() == y.name()}. \end{itemdescr} \indexlibrarymember{operator<=>}{time_zone}% @@ -8897,7 +9282,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.name() <=> y.name()}. +\returns +\tcode{x.name() <=> y.name()}. \end{itemdescr} \rSec2[time.zone.zonedtraits]{Class template \tcode{zoned_traits}} @@ -8932,7 +9318,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::chrono::locate_zone("UTC")}. +\returns +\tcode{std::chrono::locate_zone("UTC")}. \end{itemdescr} \indexlibrarymember{locate_zone}{zoned_traits}% @@ -8942,7 +9329,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::chrono::locate_zone(name)}. +\returns +\tcode{std::chrono::locate_zone(name)}. \end{itemdescr} \rSec2[time.zone.zonedtime]{Class template \tcode{zoned_time}} @@ -9094,7 +9482,8 @@ \requires \tcode{z} refers to a time zone. \pnum -\effects Constructs a \tcode{zoned_time} by +\effects +Constructs a \tcode{zoned_time} by initializing \tcode{zone_} with \tcode{std::move(z)}. % FIXME: What about tp_? \end{itemdescr} @@ -9253,7 +9642,8 @@ \requires \tcode{z} refers to a valid time zone. \pnum -\effects Constructs a \tcode{zoned_time} by +\effects +Constructs a \tcode{zoned_time} by initializing \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{y.tp_}. \end{itemdescr} @@ -9332,7 +9722,8 @@ This assignment has no effect on the return value of \tcode{get_time_zone()}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{zoned_time}% @@ -9347,7 +9738,8 @@ This assignment has no effect on the return value of \tcode{get_time_zone()}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator sys_time}{zoned_time}% @@ -9357,7 +9749,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get_sys_time()}. +\returns +\tcode{get_sys_time()}. \end{itemdescr} \indexlibrarymember{operator local_time}{zoned_time}% @@ -9367,7 +9760,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get_local_time()}. +\returns +\tcode{get_local_time()}. \end{itemdescr} \indexlibrarymember{get_time_zone}{zoned_time}% @@ -9377,7 +9771,8 @@ \begin{itemdescr} \pnum -\returns \tcode{zone_}. +\returns +\tcode{zone_}. \end{itemdescr} \indexlibrarymember{get_local_time}{zoned_time}% @@ -9387,7 +9782,8 @@ \begin{itemdescr} \pnum -\returns \tcode{zone_->to_local(tp_)}. +\returns +\tcode{zone_->to_local(tp_)}. \end{itemdescr} \indexlibrarymember{get_sys_time}{zoned_time}% @@ -9397,7 +9793,8 @@ \begin{itemdescr} \pnum -\returns \tcode{tp_}. +\returns +\tcode{tp_}. \end{itemdescr} \indexlibrarymember{get_info}{zoned_time}% @@ -9407,7 +9804,8 @@ \begin{itemdescr} \pnum -\returns \tcode{zone_->get_info(tp_)}. +\returns +\tcode{zone_->get_info(tp_)}. \end{itemdescr} \rSec3[time.zone.zonedtime.nonmembers]{Non-member functions} @@ -9421,7 +9819,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.zone_ == y.zone_ \&\& x.tp_ == y.tp_}. +\returns +\tcode{x.zone_ == y.zone_ \&\& x.tp_ == y.tp_}. \end{itemdescr} \indexlibrarymember{operator<<}{zoned_time}% @@ -9441,7 +9840,8 @@ using the format \tcode{"\%F \%T \%Z"}. \pnum -\returns \tcode{os}. +\returns +\tcode{os}. \end{itemdescr} \rSec2[time.zone.leap]{Class \tcode{leap}} @@ -9518,7 +9918,8 @@ \begin{itemdescr} \pnum -\returns The date and time at which the leap second was inserted. +\returns +The date and time at which the leap second was inserted. \end{itemdescr} \rSec3[time.zone.leap.nonmembers]{Non-member functions} @@ -9530,7 +9931,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.date() == y.date()}. +\returns +\tcode{x.date() == y.date()}. \end{itemdescr} \indexlibrarymember{operator<=>}{leap}% @@ -9540,7 +9942,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.date() <=> y.date()}. +\returns +\tcode{x.date() <=> y.date()}. \end{itemdescr} \indexlibrarymember{operator==}{leap}% @@ -9552,7 +9955,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.date() == y}. +\returns +\tcode{x.date() == y}. \end{itemdescr} \indexlibrarymember{operator<}{leap}% @@ -9564,7 +9968,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.date() < y}. +\returns +\tcode{x.date() < y}. \end{itemdescr} \indexlibrarymember{operator<}{leap}% @@ -9576,7 +9981,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x < y.date()}. +\returns +\tcode{x < y.date()}. \end{itemdescr} \indexlibrarymember{operator>}{leap}% @@ -9588,7 +9994,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y < x}. +\returns +\tcode{y < x}. \end{itemdescr} \indexlibrarymember{operator>}{leap}% @@ -9600,7 +10007,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y < x}. +\returns +\tcode{y < x}. \end{itemdescr} \indexlibrarymember{operator<=}{leap}% @@ -9612,7 +10020,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(y < x)}. +\returns +\tcode{!(y < x)}. \end{itemdescr} \indexlibrarymember{operator<=}{leap}% @@ -9624,7 +10033,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(y < x)}. +\returns +\tcode{!(y < x)}. \end{itemdescr} \indexlibrarymember{operator>=}{leap}% @@ -9636,7 +10046,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(x < y)}. +\returns +\tcode{!(x < y)}. \end{itemdescr} \indexlibrarymember{operator>=}{leap}% @@ -9648,7 +10059,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(x < y)}. +\returns +\tcode{!(x < y)}. \end{itemdescr} \indexlibrarymember{operator<=>}{leap}% @@ -9660,7 +10072,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.date() <=> y}. +\returns +\tcode{x.date() <=> y}. \end{itemdescr} \rSec2[time.zone.link]{Class \tcode{link}} @@ -9721,7 +10134,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.name() == y.name()}. +\returns +\tcode{x.name() == y.name()}. \end{itemdescr} \indexlibrarymember{operator<=>}{link}% @@ -9731,7 +10145,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.name() <=> y.name()}. +\returns +\tcode{x.name() <=> y.name()}. \end{itemdescr} \rSec1[time.format]{Formatting} @@ -10178,7 +10593,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\{time, abbrev, offset_sec\}}. +\returns +\tcode{\{time, abbrev, offset_sec\}}. \end{itemdescr} \indexlibrary{\idxcode{formatter}!specializations!chrono::local-time-format-t@\tcode{chrono::\exposid{local-time-format-t}}}% diff --git a/source/utilities.tex b/source/utilities.tex index c2e9689400..7d8bc5a52a 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -174,7 +174,8 @@ \begin{itemdescr} \pnum -\remarks This function +\remarks +This function is a designated customization point\iref{namespace.std} and shall not participate in overload resolution unless \tcode{is_move_constructible_v} is \tcode{true} and @@ -217,7 +218,8 @@ for all \tcode{i} in the range \range{0}{N}. \pnum -\effects As if by \tcode{swap_ranges(a, a + N, b)}. +\effects +As if by \tcode{swap_ranges(a, a + N, b)}. \end{itemdescr} \rSec2[utility.exchange]{\tcode{exchange}} @@ -260,10 +262,12 @@ \begin{itemdescr} \pnum -\returns \tcode{static_cast(t)}. +\returns +\tcode{static_cast(t)}. \pnum -\remarks If the second form is instantiated with an lvalue reference type, the program is ill-formed. +\remarks +If the second form is instantiated with an lvalue reference type, the program is ill-formed. \pnum \begin{example} @@ -346,7 +350,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::move(x)}. +\returns +\tcode{std::move(x)}. \end{itemdescr} \rSec2[utility.as.const]{Function template \tcode{as_const}} @@ -358,7 +363,8 @@ \begin{itemdescr} \pnum -\returns \tcode{t}. +\returns +\tcode{t}. \end{itemdescr} \rSec2[declval]{Function template \tcode{declval}} @@ -374,10 +380,12 @@ \begin{itemdescr} \pnum -\remarks If this function is odr-used\iref{basic.def.odr}, the program is ill-formed. +\remarks +If this function is odr-used\iref{basic.def.odr}, the program is ill-formed. \pnum -\remarks The template parameter \tcode{T} of \tcode{declval} may be an incomplete type. +\remarks +The template parameter \tcode{T} of \tcode{declval} may be an incomplete type. \end{itemdescr} \pnum @@ -554,7 +562,8 @@ Initializes \tcode{first} with \tcode{x} and \tcode{second} with \tcode{y}. \pnum -\remarks This constructor shall not participate in overload resolution +\remarks +This constructor shall not participate in overload resolution unless \tcode{is_copy_construct\-ible_v} is \tcode{true} and \tcode{is_copy_constructible_v} is \tcode{true}. The expression inside \tcode{explicit} is equivalent to: @@ -598,7 +607,8 @@ Initializes members from the corresponding members of the argument. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{is_constructible_v} is \tcode{true} and \tcode{is_constructible_v} is \tcode{true}. The expression inside explicit is equivalent to: @@ -621,7 +631,8 @@ \tcode{std::forward(\brk{}p.second)}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{is_constructible_v} is \tcode{true} and \tcode{is_constructible_v} is \tcode{true}. The expression inside explicit is equivalent to: @@ -643,7 +654,8 @@ and \tcode{is_constructible_v} is \tcode{true}. \pnum -\effects Initializes \tcode{first} with arguments of types +\effects +Initializes \tcode{first} with arguments of types \tcode{Args1...} obtained by forwarding the elements of \tcode{first_args} and initializes \tcode{second} with arguments of types \tcode{Args2...} obtained by forwarding the elements of \tcode{second_args}. (Here, forwarding @@ -660,15 +672,18 @@ \begin{itemdescr} \pnum -\effects Assigns \tcode{p.first} to \tcode{first} and \tcode{p.second} to \tcode{second}. +\effects +Assigns \tcode{p.first} to \tcode{first} and \tcode{p.second} to \tcode{second}. \pnum -\remarks This operator shall be defined as deleted unless +\remarks +This operator shall be defined as deleted unless \tcode{is_copy_assignable_v} is \tcode{true} and \tcode{is_copy_assignable_v} is \tcode{true}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{pair}% @@ -678,15 +693,18 @@ \begin{itemdescr} \pnum -\effects Assigns \tcode{p.first} to \tcode{first} and \tcode{p.second} to \tcode{second}. +\effects +Assigns \tcode{p.first} to \tcode{first} and \tcode{p.second} to \tcode{second}. \pnum -\remarks This operator shall not participate in overload resolution unless +\remarks +This operator shall not participate in overload resolution unless \tcode{is_assignable_v} is \tcode{true} and \tcode{is_assignable_v} is \tcode{true}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{pair}% @@ -701,18 +719,21 @@ and to \tcode{second} with\\ \tcode{std::forward(p.second)}. \pnum -\remarks This operator shall not participate in overload resolution unless +\remarks +This operator shall not participate in overload resolution unless \tcode{is_move_assignable_v} is \tcode{true} and \tcode{is_move_assignable_v} is \tcode{true}. \pnum -\remarks The expression inside \tcode{noexcept} is equivalent to: +\remarks +The expression inside \tcode{noexcept} is equivalent to: \begin{codeblock} is_nothrow_move_assignable_v && is_nothrow_move_assignable_v \end{codeblock} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{pair}% @@ -727,12 +748,14 @@ and to \tcode{second} with\\ \tcode{std::forward(p.second)}. \pnum -\remarks This operator shall not participate in overload resolution unless +\remarks +This operator shall not participate in overload resolution unless \tcode{is_assignable_v} is \tcode{true} and \tcode{is_assignable_v} is \tcode{true}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{swap}{pair}% @@ -747,12 +770,14 @@ \tcode{p.first} and \tcode{second} shall be swappable with \tcode{p.second}. \pnum -\effects Swaps +\effects +Swaps \tcode{first} with \tcode{p.first} and \tcode{second} with \tcode{p.second}. \pnum -\remarks The expression inside \tcode{noexcept} is equivalent to: +\remarks +The expression inside \tcode{noexcept} is equivalent to: \begin{codeblock} is_nothrow_swappable_v && is_nothrow_swappable_v \end{codeblock} @@ -785,7 +810,8 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \pnum \remarks @@ -858,7 +884,8 @@ \begin{itemdescr} \pnum -\returns If \tcode{I == 0} returns a reference to \tcode{p.first}; +\returns +If \tcode{I == 0} returns a reference to \tcode{p.first}; if \tcode{I == 1} returns a reference to \tcode{p.second}; otherwise the program is ill-formed. \end{itemdescr} @@ -879,7 +906,8 @@ \requires \tcode{T1} and \tcode{T2} are distinct types. Otherwise, the program is ill-formed. \pnum -\returns A reference to \tcode{p.first}. +\returns +A reference to \tcode{p.first}. \end{itemdescr} \indexlibrarymember{get}{pair}% @@ -899,7 +927,8 @@ \requires \tcode{T1} and \tcode{T2} are distinct types. Otherwise, the program is ill-formed. \pnum -\returns A reference to \tcode{p.second}. +\returns +A reference to \tcode{p.second}. \end{itemdescr} \rSec2[pair.piecewise]{Piecewise construction} @@ -1140,7 +1169,8 @@ \begin{itemdescr} \pnum -\effects Value-initializes each element. +\effects +Value-initializes each element. \pnum \remarks @@ -1163,11 +1193,13 @@ \begin{itemdescr} \pnum -\effects Initializes each element with the value of the +\effects +Initializes each element with the value of the corresponding parameter. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{sizeof...(Types) >= 1} and \tcode{is_copy_constructible_v<$\tcode{T}_i$>} is \tcode{true} for all $i$. The expression inside \tcode{explicit} is equivalent to: @@ -1183,11 +1215,13 @@ \begin{itemdescr} \pnum -\effects Initializes the elements in the tuple with the +\effects +Initializes the elements in the tuple with the corresponding value in \tcode{std::forward(u)}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{sizeof...(Types)} \tcode{==} \tcode{sizeof...(UTypes)} and \tcode{sizeof...(Types) >= 1} and \tcode{is_constructible_v<$\tcode{T}_i$, $\tcode{U}_i$\&\&>} is \tcode{true} for all $i$. @@ -1207,7 +1241,8 @@ \requires \tcode{is_copy_constructible_v<$\tcode{T}_i$>} is \tcode{true} for all $i$. \pnum -\effects Initializes each element of \tcode{*this} with the +\effects +Initializes each element of \tcode{*this} with the corresponding element of \tcode{u}. \end{itemdescr} @@ -1221,7 +1256,8 @@ \constraints \tcode{is_move_constructible_v<$\tcode{T}_i$>} is \tcode{true} for all $i$. \pnum -\effects For all $i$, initializes the $i^\text{th}$ element of \tcode{*this} with +\effects +For all $i$, initializes the $i^\text{th}$ element of \tcode{*this} with \tcode{std::forward<$\tcode{T}_i$>(get<$i$>(u))}. \end{itemdescr} @@ -1232,11 +1268,13 @@ \begin{itemdescr} \pnum -\effects Initializes each element of \tcode{*this} +\effects +Initializes each element of \tcode{*this} with the corresponding element of \tcode{u}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \begin{itemize} \item \tcode{sizeof...(Types)} \tcode{==} \tcode{sizeof...(UTypes)} and @@ -1261,12 +1299,14 @@ \begin{itemdescr} \pnum -\effects For all $i$, +\effects +For all $i$, initializes the $i^\text{th}$ element of \tcode{*this} with \tcode{std::forward<$\tcode{U}_i$>(get<$i$>(u))}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \begin{itemize} \item @@ -1294,11 +1334,13 @@ \begin{itemdescr} \pnum -\effects Initializes the first element with \tcode{u.first} and the +\effects +Initializes the first element with \tcode{u.first} and the second element with \tcode{u.second}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{sizeof...(Types) == 2}, \tcode{is_constructible_v<$\tcode{T}_0$, const U1\&>} is \tcode{true} and \tcode{is_constructible_v<$\tcode{T}_1$, const U2\&>} is \tcode{true}. @@ -1318,12 +1360,14 @@ \begin{itemdescr} \pnum -\effects Initializes the first element with +\effects +Initializes the first element with \tcode{std::forward(u.first)} and the second element with \tcode{std::forward(u.second)}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{sizeof...(Types) == 2}, \tcode{is_constructible_v<$\tcode{T}_0$, U1\&\&>} is \tcode{true} and \tcode{is_constructible_v<$\tcode{T}_1$, U2\&\&>} is \tcode{true}. @@ -1370,7 +1414,8 @@ \oldconcept{Allocator} requirements (\tref{cpp17.allocator}). \pnum -\effects Equivalent to the preceding constructors except that each element is constructed with +\effects +Equivalent to the preceding constructors except that each element is constructed with uses-allocator construction\iref{allocator.uses.construction}. \end{itemdescr} @@ -1391,15 +1436,18 @@ \begin{itemdescr} \pnum -\effects Assigns each element of \tcode{u} to the corresponding +\effects +Assigns each element of \tcode{u} to the corresponding element of \tcode{*this}. \pnum -\remarks This operator shall be defined as deleted unless +\remarks +This operator shall be defined as deleted unless \tcode{is_copy_assignable_v<$\tcode{T}_i$>} is \tcode{true} for all $i$. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{tuple}% @@ -1409,15 +1457,18 @@ \begin{itemdescr} \pnum -\effects For all $i$, assigns \tcode{std::forward<$\tcode{T}_i$>(get<$i$>(u))} to +\effects +For all $i$, assigns \tcode{std::forward<$\tcode{T}_i$>(get<$i$>(u))} to \tcode{get<$i$>(*this)}. \pnum -\remarks This operator shall not participate in overload resolution unless +\remarks +This operator shall not participate in overload resolution unless \tcode{is_move_assignable_v<$\tcode{T}_i$>} is \tcode{true} for all $i$. \pnum -\remarks The expression inside \tcode{noexcept} is equivalent to the logical \textsc{and} of the +\remarks +The expression inside \tcode{noexcept} is equivalent to the logical \textsc{and} of the following expressions: \begin{codeblock} @@ -1426,7 +1477,8 @@ where $\mathtt{T}_i$ is the $i^\text{th}$ type in \tcode{Types}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{tuple}% @@ -1436,16 +1488,19 @@ \begin{itemdescr} \pnum -\effects Assigns each element of \tcode{u} to the corresponding element +\effects +Assigns each element of \tcode{u} to the corresponding element of \tcode{*this}. \pnum -\remarks This operator shall not participate in overload resolution unless +\remarks +This operator shall not participate in overload resolution unless \tcode{sizeof...(Types) == sizeof...(UTypes)} and \tcode{is_assignable_v<$\tcode{T}_i$\&, const $\tcode{U}_i$\&>} is \tcode{true} for all $i$. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{tuple}% @@ -1455,16 +1510,19 @@ \begin{itemdescr} \pnum -\effects For all $i$, assigns \tcode{std::forward<$\tcode{U}_i$>(get<$i$>(u))} to +\effects +For all $i$, assigns \tcode{std::forward<$\tcode{U}_i$>(get<$i$>(u))} to \tcode{get<$i$>(*this)}. \pnum -\remarks This operator shall not participate in overload resolution unless +\remarks +This operator shall not participate in overload resolution unless \tcode{is_assignable_v<$\tcode{T}_i$\&, $\tcode{U}_i$\&\&> == true} for all $i$ and \tcode{sizeof...(Types) == sizeof...(UTypes)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{tuple}% @@ -1475,18 +1533,21 @@ \begin{itemdescr} \pnum -\effects Assigns \tcode{u.first} to the first element of \tcode{*this} +\effects +Assigns \tcode{u.first} to the first element of \tcode{*this} and \tcode{u.second} to the second element of \tcode{*this}. \pnum -\remarks This operator shall not participate in overload resolution unless +\remarks +This operator shall not participate in overload resolution unless \tcode{sizeof...(Types) == 2} and \tcode{is_assignable_v<$\tcode{T}_0$\&, const U1\&>} is \tcode{true} for the first type $\tcode{T}_0$ in \tcode{Types} and \tcode{is_assignable_v<$\tcode{T}_1$\&, const U2\&>} is \tcode{true} for the second type $\tcode{T}_1$ in \tcode{Types}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{tuple}% @@ -1497,7 +1558,8 @@ \begin{itemdescr} \pnum -\effects Assigns \tcode{std::forward(u.first)} to the first +\effects +Assigns \tcode{std::forward(u.first)} to the first element of \tcode{*this} and\\ \tcode{std::forward(u.second)} to the second element of \tcode{*this}. @@ -1510,7 +1572,8 @@ type $\tcode{T}_1$ in \tcode{Types}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec3[tuple.swap]{\tcode{swap}} @@ -1527,11 +1590,13 @@ the corresponding element in \tcode{rhs}. \pnum -\effects Calls \tcode{swap} for each element in \tcode{*this} and its +\effects +Calls \tcode{swap} for each element in \tcode{*this} and its corresponding element in \tcode{rhs}. \pnum -\remarks The expression inside \tcode{noexcept} is equivalent to the logical +\remarks +The expression inside \tcode{noexcept} is equivalent to the logical \textsc{and} of the following expressions: \begin{codeblock} @@ -1540,7 +1605,8 @@ where $\mathtt{T}_i$ is the $i^\text{th}$ type in \tcode{Types}. \pnum -\throws Nothing unless one of the element-wise \tcode{swap} calls throws an exception. +\throws +Nothing unless one of the element-wise \tcode{swap} calls throws an exception. \end{itemdescr} \rSec3[tuple.creation]{Tuple creation functions} @@ -1559,7 +1625,8 @@ \begin{itemdescr} \pnum -\returns \tcode{tuple...>(std::forward(t)...)}. +\returns +\tcode{tuple...>(std::forward(t)...)}. \pnum \begin{example} @@ -1580,14 +1647,16 @@ \begin{itemdescr} \pnum -\effects Constructs a tuple of references to the arguments in \tcode{t} suitable +\effects +Constructs a tuple of references to the arguments in \tcode{t} suitable for forwarding as arguments to a function. Because the result may contain references to temporary objects, a program shall ensure that the return value of this function does not outlive any of its arguments (e.g., the program should typically not store the result in a named variable). \pnum -\returns \tcode{tuple(std::forward(t)...)}. +\returns +\tcode{tuple(std::forward(t)...)}. \end{itemdescr} \indexlibrary{\idxcode{tie}}% @@ -1600,7 +1669,8 @@ \begin{itemdescr} \pnum -\returns \tcode{tuple(t...)}. When an +\returns +\tcode{tuple(t...)}. When an argument in \tcode{t} is \tcode{ignore}, assigning any value to the corresponding tuple element has no effect. @@ -1643,7 +1713,8 @@ \end{itemize} \pnum -\remarks The types in \tcode{CTypes} shall be equal to the ordered +\remarks +The types in \tcode{CTypes} shall be equal to the ordered sequence of the extended types \tcode{$\tcode{Args}_0$..., $\tcode{Args}_1$..., $\dotsc$, $\tcode{Args}_{n-1}$...}, where $n$ is @@ -1652,7 +1723,8 @@ corresponding to the type sequence $\tcode{Args}_i$. \pnum -\returns A \tcode{tuple} object constructed by initializing the ${k_i}^\text{th}$ +\returns +A \tcode{tuple} object constructed by initializing the ${k_i}^\text{th}$ type element $\tcode{e}_{ik}$ in \tcode{$\tcode{e}_i$...} with \begin{codeblock} get<@$k_i$@>(std::forward<@$\tcode{T}_i$@>(@$\tcode{tp}_i$@)) @@ -1729,7 +1801,8 @@ \begin{itemdescr} \pnum -\remarks All specializations of \tcode{tuple_size} shall meet the +\remarks +All specializations of \tcode{tuple_size} shall meet the \oldconcept{UnaryTypeTrait} requirements\iref{meta.rqmts} with a base characteristic of \tcode{integral_constant} for some \tcode{N}. @@ -1853,7 +1926,8 @@ The program is ill-formed if \tcode{I} is out of bounds. \pnum -\returns A reference to the $\tcode{I}^\text{th}$ element of \tcode{t}, where +\returns +A reference to the $\tcode{I}^\text{th}$ element of \tcode{t}, where indexing is zero-based. \pnum @@ -1894,7 +1968,8 @@ Otherwise, the program is ill-formed. \pnum -\returns A reference to the element of \tcode{t} corresponding to the type +\returns +A reference to the element of \tcode{t} corresponding to the type \tcode{T} in \tcode{Types}. \pnum @@ -1933,12 +2008,14 @@ \tcode{sizeof...(UTypes)}. \pnum -\returns \tcode{true} if \tcode{get(t) == get(u)} for all +\returns +\tcode{true} if \tcode{get(t) == get(u)} for all \tcode{i}, otherwise \tcode{false}. For any two zero-length tuples \tcode{e} and \tcode{f}, \tcode{e == f} returns \tcode{true}. \pnum -\effects The elementary comparisons are performed in order from the +\effects +The elementary comparisons are performed in order from the zeroth index upwards. No comparisons or element accesses are performed after the first equality comparison that evaluates to \tcode{false}. @@ -2005,7 +2082,8 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{is_swappable_v} is \tcode{true} for every type \tcode{T} in \tcode{Types}. The expression inside \tcode{noexcept} is equivalent to: @@ -2015,7 +2093,8 @@ \end{codeblock} \pnum -\effects As if by \tcode{x.swap(y)}. +\effects +As if by \tcode{x.swap(y)}. \end{itemdescr} \rSec1[optional]{Optional objects} @@ -2925,10 +3004,12 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if and only if \tcode{*this} contains a value. +\returns +\tcode{true} if and only if \tcode{*this} contains a value. \pnum -\remarks This function shall be a constexpr function. +\remarks +This function shall be a constexpr function. \end{itemdescr} \indexlibrarymember{value}{optional}% @@ -3470,7 +3551,8 @@ Calls \tcode{x.swap(y)}. \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{is_move_constructible_v} is \tcode{true} and \tcode{is_swappable_v} is \tcode{true}. \end{itemdescr} @@ -3494,7 +3576,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return optional(in_place, std::forward(args)...);} +\effects +Equivalent to: \tcode{return optional(in_place, std::forward(args)...);} \end{itemdescr} \indexlibrary{\idxcode{make_optional}}% @@ -3505,7 +3588,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return optional(in_place, il, std::forward(args)...);} +\effects +Equivalent to: \tcode{return optional(in_place, il, std::forward(args)...);} \end{itemdescr} \rSec2[optional.hash]{Hash support} @@ -4056,10 +4140,12 @@ \end{itemize} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\ensures \tcode{index() == rhs.index()}. +\ensures +\tcode{index() == rhs.index()}. \pnum \remarks @@ -4098,7 +4184,8 @@ \end{itemize} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum \remarks @@ -4159,7 +4246,8 @@ selected by the imaginary function overload resolution described above. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum \remarks @@ -4766,7 +4854,8 @@ otherwise, the program is ill-formed. \pnum -\returns $e(\tcode{m})$, where \tcode{m} is the pack for which +\returns +$e(\tcode{m})$, where \tcode{m} is the pack for which $\tcode{m}_i$ is \tcode{vars$_i$.index()} for all $0 \leq i < n$. The return type is $\tcode{decltype(}e(\tcode{m})\tcode{)}$ for the first form. @@ -4825,10 +4914,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{v.swap(w)}. +\effects +Equivalent to \tcode{v.swap(w)}. \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{is_move_constructible_v<$\tcode{T}_i$> \&\& is_swappable_v<$\tcode{T}_i$>} is \tcode{true} for all $i$. The expression inside \tcode{noexcept} is equivalent to \tcode{noexcept(v.swap(w))}. @@ -4856,7 +4947,8 @@ \begin{itemdescr} \pnum -\returns An \impldef{return value of \tcode{bad_variant_access::what}} \ntbs{}. +\returns +An \impldef{return value of \tcode{bad_variant_access::what}} \ntbs{}. \end{itemdescr} \rSec2[variant.hash]{Hash support} @@ -4951,7 +5043,8 @@ \begin{itemdescr} \pnum -\returns An \impldef{return value of \tcode{bad_any_cast::what}} \ntbs{}. +\returns +An \impldef{return value of \tcode{bad_any_cast::what}} \ntbs{}. \end{itemdescr} \rSec2[any.class]{Class \tcode{any}} @@ -5109,14 +5202,17 @@ \requires \tcode{VT} shall meet the \oldconcept{CopyConstructible} requirements. \pnum -\effects Initializes the contained value as if direct-non-list-initializing an object of +\effects +Initializes the contained value as if direct-non-list-initializing an object of type \tcode{VT} with the arguments \tcode{std::forward(args)...}. \pnum -\ensures \tcode{*this} contains a value of type \tcode{VT}. +\ensures +\tcode{*this} contains a value of type \tcode{VT}. \pnum -\throws Any exception thrown by the selected constructor of \tcode{VT}. +\throws +Any exception thrown by the selected constructor of \tcode{VT}. \pnum \remarks @@ -5139,14 +5235,17 @@ \requires \tcode{VT} shall meet the \oldconcept{CopyConstructible} requirements. \pnum -\effects Initializes the contained value as if direct-non-list-initializing an object of +\effects +Initializes the contained value as if direct-non-list-initializing an object of type \tcode{VT} with the arguments \tcode{il, std::forward(args)...}. \pnum -\ensures \tcode{*this} contains a value. +\ensures +\tcode{*this} contains a value. \pnum -\throws Any exception thrown by the selected constructor of \tcode{VT}. +\throws +Any exception thrown by the selected constructor of \tcode{VT}. \pnum \remarks @@ -5259,22 +5358,26 @@ \tcode{VT} shall meet the \oldconcept{CopyConstructible} requirements. \pnum -\effects Calls \tcode{reset()}. +\effects +Calls \tcode{reset()}. Then initializes the contained value as if direct-non-list-initializing an object of type \tcode{VT} with the arguments \tcode{std::forward(args)...}. \pnum -\ensures \tcode{*this} contains a value. +\ensures +\tcode{*this} contains a value. \pnum \returns A reference to the new contained value. \pnum -\throws Any exception thrown by the selected constructor of \tcode{VT}. +\throws +Any exception thrown by the selected constructor of \tcode{VT}. \pnum -\remarks If an exception is thrown during the call to \tcode{VT}'s constructor, +\remarks +If an exception is thrown during the call to \tcode{VT}'s constructor, \tcode{*this} does not contain a value, and any previously contained value has been destroyed. This function shall not participate in overload resolution unless @@ -5297,22 +5400,26 @@ \tcode{VT} shall meet the \oldconcept{CopyConstructible} requirements. \pnum -\effects Calls \tcode{reset()}. Then initializes the contained value +\effects +Calls \tcode{reset()}. Then initializes the contained value as if direct-non-list-initializing an object of type \tcode{VT} with the arguments \tcode{il, std::forward(args)...}. \pnum -\ensures \tcode{*this} contains a value. +\ensures +\tcode{*this} contains a value. \pnum \returns A reference to the new contained value. \pnum -\throws Any exception thrown by the selected constructor of \tcode{VT}. +\throws +Any exception thrown by the selected constructor of \tcode{VT}. \pnum -\remarks If an exception is thrown during the call to \tcode{VT}'s constructor, +\remarks +If an exception is thrown during the call to \tcode{VT}'s constructor, \tcode{*this} does not contain a value, and any previously contained value has been destroyed. The function shall not participate in overload resolution unless @@ -5767,7 +5874,8 @@ \begin{itemdescr} \pnum -\effects Constructs an object of class \tcode{bitset} as if by: +\effects +Constructs an object of class \tcode{bitset} as if by: \begin{codeblock} bitset(n == basic_string::npos ? basic_string(str) @@ -6147,7 +6255,8 @@ \begin{itemdescr} \pnum -\returns \tcode{count() == size()}. +\returns +\tcode{count() == size()}. \end{itemdescr} \indexlibrary{\idxcode{any} (member)!\idxcode{bitset}}% @@ -6158,7 +6267,8 @@ \begin{itemdescr} \pnum -\returns \tcode{count() != 0}. +\returns +\tcode{count() != 0}. \end{itemdescr} \indexlibrarymember{none}{bitset}% @@ -6168,7 +6278,8 @@ \begin{itemdescr} \pnum -\returns \tcode{count() == 0}. +\returns +\tcode{count() == 0}. \end{itemdescr} \indexlibrarymember{operator<<}{bitset}% @@ -6209,7 +6320,8 @@ one, otherwise \tcode{false}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{operator[]}{bitset}% @@ -6234,10 +6346,12 @@ \tcode{this->set(pos, val)}. \pnum -\throws Nothing. +\throws +Nothing. \pnum -\remarks For the purpose of determining the presence of a data +\remarks +For the purpose of determining the presence of a data race\iref{intro.multithread}, any access or update through the resulting reference potentially accesses or modifies, respectively, the entire underlying bitset. @@ -6909,11 +7023,13 @@ \begin{itemdescr} \pnum -\remarks If \tcode{element_type} is \cv{}~\tcode{void}, the type of +\remarks +If \tcode{element_type} is \cv{}~\tcode{void}, the type of \tcode{r} is unspecified; otherwise, it is \tcode{element_type\&}. \pnum -\returns The first member function returns a pointer to \tcode{r} +\returns +The first member function returns a pointer to \tcode{r} obtained by calling \tcode{Ptr::pointer_to(r)} through which indirection is valid; an instantiation of this function is ill-formed if \tcode{Ptr} does not have a matching \tcode{pointer_to} static member @@ -6958,7 +7074,8 @@ \requires \tcode{T} is not a function type. Otherwise the program is ill-formed. \pnum -\returns \tcode{p}. +\returns +\tcode{p}. \end{itemdescr} \indexlibrary{\idxcode{to_address}}% @@ -6993,11 +7110,13 @@ pointer\iref{basic.stc.dynamic.safety} or a null pointer value. \pnum -\effects If \tcode{p} is not null, the complete object referenced by \tcode{p} +\effects +If \tcode{p} is not null, the complete object referenced by \tcode{p} is subsequently declared reachable\iref{basic.stc.dynamic.safety}. \pnum -\throws May throw \tcode{bad_alloc} if the system cannot allocate +\throws +May throw \tcode{bad_alloc} if the system cannot allocate additional memory that may be required to track objects declared reachable. \end{itemdescr} @@ -7014,10 +7133,12 @@ \tcode{undeclare_reachable(p)} call on the object. \pnum -\returns A safely derived copy of \tcode{p} which shall compare equal to \tcode{p}. +\returns +A safely derived copy of \tcode{p} which shall compare equal to \tcode{p}. \pnum -\throws Nothing. +\throws +Nothing. \pnum \begin{note} It is expected that calls to \tcode{declare_reachable(p)} will consume @@ -7042,7 +7163,8 @@ being collected. \end{note} \pnum -\effects The \tcode{n} bytes starting at \tcode{p} no longer contain +\effects +The \tcode{n} bytes starting at \tcode{p} no longer contain traceable pointer locations, independent of their type. Hence indirection through a pointer located there is undefined if the object it points to was created by global \tcode{operator new} and not @@ -7051,7 +7173,8 @@ be traced. \end{note} \pnum -\throws Nothing. +\throws +Nothing. \pnum \begin{note} Under some conditions implementations may need to allocate memory. @@ -7069,11 +7192,13 @@ \tcode{declare_no_pointers()}. \pnum -\effects Unregisters a range registered with \tcode{declare_no_pointers()} for +\effects +Unregisters a range registered with \tcode{declare_no_pointers()} for destruction. It shall be called before the lifetime of the object ends. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrary{\idxcode{get_pointer_safety}}% @@ -7083,7 +7208,8 @@ \begin{itemdescr} \pnum -\returns \tcode{pointer_safety::strict} if the implementation has strict pointer +\returns +\tcode{pointer_safety::strict} if the implementation has strict pointer safety\iref{basic.stc.dynamic.safety}. It is \impldef{whether \tcode{get_pointer_safety} returns \tcode{pointer_safety::relaxed} or @@ -7106,7 +7232,8 @@ \begin{itemdescr} \pnum -\effects If it is possible to fit \tcode{size} bytes +\effects +If it is possible to fit \tcode{size} bytes of storage aligned by \tcode{alignment} into the buffer pointed to by \tcode{ptr} with length \tcode{space}, the function updates \tcode{ptr} to represent the first possible address of such storage @@ -7124,7 +7251,8 @@ \end{itemize} \pnum -\returns A null pointer if the requested aligned buffer +\returns +A null pointer if the requested aligned buffer would not fit into the available space, otherwise the adjusted value of \tcode{ptr}. @@ -7202,7 +7330,8 @@ \begin{itemdescr} \pnum -\remarks Automatically detects whether \tcode{T} has a nested \tcode{allocator_type} that +\remarks +Automatically detects whether \tcode{T} has a nested \tcode{allocator_type} that is convertible from \tcode{Alloc}. Meets the \oldconcept{BinaryTypeTrait} requirements\iref{meta.rqmts}. The implementation shall provide a definition that is derived from \tcode{true_type} if the \grammarterm{qualified-id} \tcode{T::allocator_type} @@ -7667,7 +7796,8 @@ \begin{itemdescr} \pnum -\returns \tcode{a.allocate(n)}. +\returns +\tcode{a.allocate(n)}. \end{itemdescr} \indexlibrarymember{allocate}{allocator_traits}% @@ -7677,7 +7807,8 @@ \begin{itemdescr} \pnum -\returns \tcode{a.allocate(n, hint)} if that expression is well-formed; otherwise, \tcode{a.allocate(n)}. +\returns +\tcode{a.allocate(n, hint)} if that expression is well-formed; otherwise, \tcode{a.allocate(n)}. \end{itemdescr} \indexlibrarymember{deallocate}{allocator_traits}% @@ -7687,10 +7818,12 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{a.deallocate(p, n)}. +\effects +Calls \tcode{a.deallocate(p, n)}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{construct}{allocator_traits}% @@ -7701,7 +7834,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{a.construct(p, std::forward(args)...)} +\effects +Calls \tcode{a.construct(p, std::forward(args)...)} if that call is well-formed; otherwise, invokes \tcode{construct_at(p, std::forward(args)...)}. \end{itemdescr} @@ -7714,7 +7848,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{a.destroy(p)} if that call is well-formed; otherwise, invokes +\effects +Calls \tcode{a.destroy(p)} if that call is well-formed; otherwise, invokes \tcode{destroy_at(p)}. \end{itemdescr} @@ -7725,7 +7860,8 @@ \begin{itemdescr} \pnum -\returns \tcode{a.max_size()} if that expression is well-formed; otherwise, +\returns +\tcode{a.max_size()} if that expression is well-formed; otherwise, \tcode{numeric_limits::\brk{}max()/sizeof(value_type)}. \end{itemdescr} @@ -7736,7 +7872,8 @@ \begin{itemdescr} \pnum -\returns \tcode{rhs.select_on_container_copy_construction()} if that expression is +\returns +\tcode{rhs.select_on_container_copy_construction()} if that expression is well-formed; otherwise, \tcode{rhs}. \end{itemdescr} @@ -8013,11 +8150,13 @@ \begin{itemdescr} \pnum -\returns The actual address of the object or function referenced by \tcode{r}, even in the +\returns +The actual address of the object or function referenced by \tcode{r}, even in the presence of an overloaded \tcode{operator\&}. \pnum -\remarks An expression \tcode{addressof(E)} +\remarks +An expression \tcode{addressof(E)} is a constant subexpression\iref{defns.const.subexpr} if \tcode{E} is an lvalue constant subexpression. \end{itemdescr} @@ -8055,7 +8194,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} for (; first != last; ++first) ::new (@\placeholdernc{voidify}@(*first)) remove_reference_t>; @@ -8092,7 +8232,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return uninitialized_default_construct(counted_iterator(first, n), default_sentinel).base(); @@ -8132,7 +8273,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} for (; first != last; ++first) ::new (@\placeholdernc{voidify}@(*first)) remove_reference_t>(); @@ -8169,7 +8311,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return uninitialized_value_construct(counted_iterator(first, n), default_sentinel).base(); @@ -8225,7 +8368,8 @@ \range{ofirst}{olast} shall not overlap with \range{ifirst}{ilast}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) { ::new (@\placeholdernc{voidify}@(*ofirst)) remove_reference_t>(*ifirst); @@ -8256,7 +8400,8 @@ \end{codeblock} \pnum -\returns \tcode{result}. +\returns +\tcode{result}. \end{itemdescr} \indexlibrary{\idxcode{uninitialized_copy_n}}% @@ -8276,7 +8421,8 @@ \range{ifirst}{n}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto t = uninitialized_copy(counted_iterator(ifirst, n), default_sentinel, ofirst, olast); @@ -8330,7 +8476,8 @@ \range{ofirst}{olast} shall not overlap with \range{ifirst}{ilast}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) { ::new (@\placeholder{voidify}@(*ofirst)) @@ -8386,7 +8533,8 @@ \range{ifirst}{n}. \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} auto t = uninitialized_move(counted_iterator(ifirst, n), default_sentinel, ofirst, olast); @@ -8433,7 +8581,8 @@ \end{itemdecl} \begin{itemdescr} -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} for (; first != last; ++first) { ::new (@\placeholdernc{voidify}@(*first)) remove_reference_t>(x); @@ -8471,7 +8620,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return uninitialized_fill(counted_iterator(first, n), default_sentinel, x).base(); \end{codeblock} @@ -8557,7 +8707,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} for (; first != last; ++first) destroy_at(addressof(*first)); @@ -8593,7 +8744,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return destroy(counted_iterator(first, n), default_sentinel).base(); \end{codeblock} @@ -8736,11 +8888,13 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{default_delete} object +\effects +Constructs a \tcode{default_delete} object from another \tcode{default_delete} object. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{U*} is implicitly convertible to \tcode{T*}. \end{itemdescr} @@ -8751,10 +8905,12 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{delete} on \tcode{ptr}. +\effects +Calls \tcode{delete} on \tcode{ptr}. \pnum -\remarks If \tcode{T} is an incomplete type, the program is ill-formed. +\remarks +If \tcode{T} is an incomplete type, the program is ill-formed. \end{itemdescr} \rSec4[unique.ptr.dltr.dflt1]{\tcode{default_delete}} @@ -8796,7 +8952,8 @@ Calls \tcode{delete[]} on \tcode{ptr}. \pnum -\remarks If \tcode{U} is an incomplete type, the program is ill-formed. +\remarks +If \tcode{U} is an incomplete type, the program is ill-formed. This function shall not participate in overload resolution unless \tcode{U(*)[]} is convertible to \tcode{T(*)[]}. \end{itemdescr} @@ -8896,15 +9053,18 @@ and that construction shall not throw an exception. \pnum -\effects Constructs a \tcode{unique_ptr} object that owns +\effects +Constructs a \tcode{unique_ptr} object that owns nothing, value-initializing the stored pointer and the stored deleter. \pnum -\ensures \tcode{get() == nullptr}. \tcode{get_deleter()} +\ensures +\tcode{get() == nullptr}. \tcode{get_deleter()} returns a reference to the stored deleter. \pnum -\remarks If \tcode{is_pointer_v} is \tcode{true} or +\remarks +If \tcode{is_pointer_v} is \tcode{true} or \tcode{is_default_constructible_v} is \tcode{false}, this constructor shall not participate in overload resolution. \end{itemdescr} @@ -8921,16 +9081,19 @@ and that construction shall not throw an exception. \pnum -\effects Constructs a \tcode{unique_ptr} which owns +\effects +Constructs a \tcode{unique_ptr} which owns \tcode{p}, initializing the stored pointer with \tcode{p} and value-initializing the stored deleter. \pnum -\ensures \tcode{get() == p}. \tcode{get_deleter()} +\ensures +\tcode{get() == p}. \tcode{get_deleter()} returns a reference to the stored deleter. \pnum -\remarks If \tcode{is_pointer_v} is \tcode{true} or +\remarks +If \tcode{is_pointer_v} is \tcode{true} or \tcode{is_default_constructible_v} is \tcode{false}, this constructor shall not participate in overload resolution. If class template argument deduction\iref{over.match.class.deduct} @@ -8954,24 +9117,28 @@ such construction shall not exit via an exception. \pnum -\effects Constructs a \tcode{unique_ptr} object which owns \tcode{p}, initializing +\effects +Constructs a \tcode{unique_ptr} object which owns \tcode{p}, initializing the stored pointer with \tcode{p} and initializing the deleter from \tcode{std::forward(d)}. \pnum -\remarks If \tcode{D} is a reference type, +\remarks +If \tcode{D} is a reference type, the second constructor is defined as deleted. These constructors shall not participate in overload resolution unless \tcode{is_constructible_v} is \tcode{true}. \pnum -\ensures \tcode{get() == p}. +\ensures +\tcode{get() == p}. \tcode{get_deleter()} returns a reference to the stored deleter. If \tcode{D} is a reference type then \tcode{get_deleter()} returns a reference to the lvalue \tcode{d}. \pnum -\remarks If class template argument deduction\iref{over.match.class.deduct} +\remarks +If class template argument deduction\iref{over.match.class.deduct} would select a function template corresponding to either of these constructors, then the program is ill-formed. @@ -9006,14 +9173,16 @@ throw an exception. \pnum -\effects Constructs a \tcode{unique_ptr} from +\effects +Constructs a \tcode{unique_ptr} from \tcode{u}. If \tcode{D} is a reference type, this deleter is copy constructed from \tcode{u}'s deleter; otherwise, this deleter is move constructed from \tcode{u}'s deleter. \begin{note} The construction of the deleter can be implemented with \tcode{std::forward}. \end{note} \pnum -\ensures \tcode{get()} yields the value \tcode{u.get()} +\ensures +\tcode{get()} yields the value \tcode{u.get()} yielded before the construction. \tcode{u.get() == nullptr}. \tcode{get_deleter()} returns a reference to the stored deleter that was constructed from @@ -9036,7 +9205,8 @@ lvalue of type \tcode{E} shall be well-formed and shall not throw an exception. \pnum -\remarks This constructor shall not participate in overload resolution unless: +\remarks +This constructor shall not participate in overload resolution unless: \begin{itemize} \item \tcode{unique_ptr::pointer} is implicitly convertible to \tcode{pointer}, @@ -9046,14 +9216,16 @@ \end{itemize} \pnum -\effects Constructs a \tcode{unique_ptr} from \tcode{u}. +\effects +Constructs a \tcode{unique_ptr} from \tcode{u}. If \tcode{E} is a reference type, this deleter is copy constructed from \tcode{u}'s deleter; otherwise, this deleter is move constructed from \tcode{u}'s deleter. \begin{note} The deleter constructor can be implemented with \tcode{std::forward}. \end{note} \pnum -\ensures \tcode{get()} yields the value \tcode{u.get()} +\ensures +\tcode{get()} yields the value \tcode{u.get()} yielded before the construction. \tcode{u.get() == nullptr}. \tcode{get_deleter()} returns a reference to the stored deleter that was constructed from @@ -9075,7 +9247,8 @@ \end{note} \pnum -\effects If \tcode{get() == nullptr} there are no effects. +\effects +If \tcode{get() == nullptr} there are no effects. Otherwise \tcode{get_deleter()(get())}. \end{itemdescr} @@ -9100,14 +9273,17 @@ lvalue of type \tcode{D} shall not throw an exception. \pnum -\effects Calls \tcode{reset(u.release())} followed by +\effects +Calls \tcode{reset(u.release())} followed by \tcode{get_deleter() = std::forward(u.get_dele\-ter())}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\ensures \tcode{u.get() == nullptr}. +\ensures +\tcode{u.get() == nullptr}. \end{itemdescr} \indexlibrarymember{operator=}{unique_ptr}% @@ -9123,7 +9299,8 @@ of type \tcode{E} shall be well-formed and shall not throw an exception. \pnum -\remarks This operator shall not participate in overload resolution unless: +\remarks +This operator shall not participate in overload resolution unless: \begin{itemize} \item \tcode{unique_ptr::pointer} is implicitly convertible to \tcode{pointer}, and @@ -9132,14 +9309,17 @@ \end{itemize} \pnum -\effects Calls \tcode{reset(u.release())} followed by +\effects +Calls \tcode{reset(u.release())} followed by \tcode{get_deleter() = std::forward(u.get_dele\-ter())}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\ensures \tcode{u.get() == nullptr}. +\ensures +\tcode{u.get() == nullptr}. \end{itemdescr} \indexlibrarymember{operator=}{unique_ptr}% @@ -9149,13 +9329,16 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{reset()}. +\effects +As if by \tcode{reset()}. \pnum -\ensures \tcode{get() == nullptr}. +\ensures +\tcode{get() == nullptr}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec4[unique.ptr.single.observers]{Observers} @@ -9170,7 +9353,8 @@ \requires \tcode{get() != nullptr}. \pnum -\returns \tcode{*get()}. +\returns +\tcode{*get()}. \end{itemdescr} @@ -9184,7 +9368,8 @@ \requires \tcode{get() != nullptr}. \pnum -\returns \tcode{get()}. +\returns +\tcode{get()}. \pnum \begin{note} @@ -9199,7 +9384,8 @@ \begin{itemdescr} \pnum -\returns The stored pointer. +\returns +The stored pointer. \end{itemdescr} \indexlibrarymember{get_deleter}{unique_ptr}% @@ -9210,7 +9396,8 @@ \begin{itemdescr} \pnum -\returns A reference to the stored deleter. +\returns +A reference to the stored deleter. \end{itemdescr} \indexlibrarymember{operator bool}{unique_ptr}% @@ -9220,7 +9407,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get() != nullptr}. +\returns +\tcode{get() != nullptr}. \end{itemdescr} \rSec4[unique.ptr.single.modifiers]{Modifiers} @@ -9232,10 +9420,12 @@ \begin{itemdescr} \pnum -\ensures \tcode{get() == nullptr}. +\ensures +\tcode{get() == nullptr}. \pnum -\returns The value \tcode{get()} had at the start of +\returns +The value \tcode{get()} had at the start of the call to \tcode{release}. \end{itemdescr} @@ -9250,13 +9440,15 @@ well-defined behavior, and shall not throw exceptions. \pnum -\effects Assigns \tcode{p} to the stored pointer, and then if and only if the old value of the +\effects +Assigns \tcode{p} to the stored pointer, and then if and only if the old value of the stored pointer, \tcode{old_p}, was not equal to \tcode{nullptr}, calls \tcode{get_deleter()(old_p)}. \begin{note} The order of these operations is significant because the call to \tcode{get_deleter()} may destroy \tcode{*this}. \end{note} \pnum -\ensures \tcode{get() == p}. +\ensures +\tcode{get() == p}. \begin{note} The postcondition does not hold if the call to \tcode{get_deleter()} destroys \tcode{*this} since \tcode{this->get()} is no longer a valid expression. \end{note} @@ -9275,7 +9467,8 @@ under \tcode{swap}. \pnum -\effects Invokes \tcode{swap} on the stored pointers and on the stored +\effects +Invokes \tcode{swap} on the stored pointers and on the stored deleters of \tcode{*this} and \tcode{u}. \end{itemdescr} @@ -9471,7 +9664,8 @@ the stored pointer points. \pnum -\returns \tcode{get()[i]}. +\returns +\tcode{get()[i]}. \end{itemdescr} \rSec4[unique.ptr.runtime.modifiers]{Modifiers} @@ -9483,7 +9677,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{reset(pointer())}. +\effects +Equivalent to \tcode{reset(pointer())}. \end{itemdescr} \indexlibrarymember{reset}{unique_ptr}% @@ -9515,10 +9710,12 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution unless \tcode{T} is not an array. +\remarks +This function shall not participate in overload resolution unless \tcode{T} is not an array. \pnum -\returns \tcode{unique_ptr(new T(std::forward(args)...))}. +\returns +\tcode{unique_ptr(new T(std::forward(args)...))}. \end{itemdescr} @@ -9529,10 +9726,12 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution unless \tcode{T} is an array of unknown bound. +\remarks +This function shall not participate in overload resolution unless \tcode{T} is an array of unknown bound. \pnum -\returns \tcode{unique_ptr(new remove_extent_t[n]())}. +\returns +\tcode{unique_ptr(new remove_extent_t[n]())}. \end{itemdescr} @@ -9543,7 +9742,8 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution unless \tcode{T} is an array of known bound. +\remarks +This function shall not participate in overload resolution unless \tcode{T} is an array of known bound. \end{itemdescr} @@ -9597,11 +9797,13 @@ \begin{itemdescr} \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{is_swappable_v} is \tcode{true}. \pnum -\effects Calls \tcode{x.swap(y)}. +\effects +Calls \tcode{x.swap(y)}. \end{itemdescr} \indexlibrarymember{operator==}{unique_ptr}% @@ -9612,7 +9814,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x.get() == y.get()}. +\returns +\tcode{x.get() == y.get()}. \end{itemdescr} \indexlibrarymember{operator<}{unique_ptr}% @@ -9633,10 +9836,12 @@ induces a strict weak ordering\iref{alg.sorting} on the pointer values. \pnum -\returns \tcode{less()(x.get(), y.get())}. +\returns +\tcode{less()(x.get(), y.get())}. \pnum -\remarks If \tcode{unique_ptr::pointer} is not implicitly convertible +\remarks +If \tcode{unique_ptr::pointer} is not implicitly convertible to \tcode{CT} or \tcode{unique_ptr::pointer} is not implicitly convertible to \tcode{CT}, the program is ill-formed. \end{itemdescr} @@ -9649,7 +9854,8 @@ \begin{itemdescr} \pnum -\returns \tcode{y < x}. +\returns +\tcode{y < x}. \end{itemdescr} \indexlibrarymember{operator<=}{unique_ptr}% @@ -9660,7 +9866,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(y < x)}. +\returns +\tcode{!(y < x)}. \end{itemdescr} \indexlibrarymember{operator>=}{unique_ptr}% @@ -9671,7 +9878,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!(x < y)}. +\returns +\tcode{!(x < y)}. \end{itemdescr} \indexlibrarymember{operator<=>}{unique_ptr}% @@ -9698,7 +9906,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!x}. +\returns +\tcode{!x}. \end{itemdescr} \indexlibrarymember{operator<}{unique_ptr}% @@ -9796,13 +10005,16 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{os << p.get();} +\effects +Equivalent to: \tcode{os << p.get();} \pnum -\returns \tcode{os}. +\returns +\tcode{os}. \pnum -\remarks This function shall not participate in overload resolution +\remarks +This function shall not participate in overload resolution unless \tcode{os << p.get()} is a valid expression. \end{itemdescr} @@ -9977,10 +10189,12 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{shared_ptr} object. +\effects +Constructs an empty \tcode{shared_ptr} object. \pnum -\ensures \tcode{use_count() == 0 \&\& get() == nullptr}. +\ensures +\tcode{use_count() == 0 \&\& get() == nullptr}. \end{itemdescr} \indexlibrary{\idxcode{shared_ptr}!constructor}% @@ -9997,7 +10211,8 @@ shall not throw exceptions. \pnum -\effects When \tcode{T} is not an array type, +\effects +When \tcode{T} is not an array type, constructs a \tcode{shared_ptr} object that owns the pointer \tcode{p}. Otherwise, constructs a \tcode{shared_ptr} @@ -10009,14 +10224,17 @@ when \tcode{T} is not an array type, \tcode{delete[] p} otherwise. \pnum -\ensures \tcode{use_count() == 1 \&\& get() == p}. +\ensures +\tcode{use_count() == 1 \&\& get() == p}. \pnum -\throws \tcode{bad_alloc}, or an \impldef{exception type when \tcode{shared_ptr} +\throws +\tcode{bad_alloc}, or an \impldef{exception type when \tcode{shared_ptr} constructor fails} exception when a resource other than memory could not be obtained. \pnum -\remarks When \tcode{T} is an array type, +\remarks +When \tcode{T} is an array type, this constructor shall not participate in overload resolution unless the expression \tcode{delete[] p} is well-formed and either \tcode{T} is \tcode{U[N]} and \tcode{Y(*)[N]} is convertible to \tcode{T*}, or @@ -10045,7 +10263,8 @@ (\tref{cpp17.allocator}). \pnum -\effects Constructs a \tcode{shared_ptr} object that owns the +\effects +Constructs a \tcode{shared_ptr} object that owns the object \tcode{p} and the deleter \tcode{d}. When \tcode{T} is not an array type, the first and second constructors enable \tcode{shared_from_this} with \tcode{p}. @@ -10054,10 +10273,12 @@ If an exception is thrown, \tcode{d(p)} is called. \pnum -\ensures \tcode{use_count() == 1 \&\& get() == p}. +\ensures +\tcode{use_count() == 1 \&\& get() == p}. \pnum -\throws \tcode{bad_alloc}, or an \impldef{exception type when \tcode{shared_ptr} +\throws +\tcode{bad_alloc}, or an \impldef{exception type when \tcode{shared_ptr} constructor fails} exception when a resource other than memory could not be obtained. @@ -10084,12 +10305,14 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{shared_ptr} instance that +\effects +Constructs a \tcode{shared_ptr} instance that stores \tcode{p} and shares ownership with the initial value of \tcode{r}. \pnum -\ensures \tcode{get() == p}. +\ensures +\tcode{get() == p}. For the second overload, \tcode{r} is empty and \tcode{r.get() == nullptr}. @@ -10116,12 +10339,14 @@ \tcode{Y*} is compatible with \tcode{T*}. \pnum -\effects If \tcode{r} is empty, constructs +\effects +If \tcode{r} is empty, constructs an empty \tcode{shared_ptr} object; otherwise, constructs a \tcode{shared_ptr} object that shares ownership with \tcode{r}. \pnum -\ensures \tcode{get() == r.get() \&\& use_count() == r.use_count()}. +\ensures +\tcode{get() == r.get() \&\& use_count() == r.use_count()}. \end{itemdescr} \indexlibrary{\idxcode{shared_ptr}!constructor}% @@ -10132,14 +10357,17 @@ \begin{itemdescr} \pnum -\remarks The second constructor shall not participate in overload resolution unless +\remarks +The second constructor shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*}. \pnum -\effects Move constructs a \tcode{shared_ptr} instance from \tcode{r}. +\effects +Move constructs a \tcode{shared_ptr} instance from \tcode{r}. \pnum -\ensures \tcode{*this} shall contain the old value of +\ensures +\tcode{*this} shall contain the old value of \tcode{r}. \tcode{r} shall be empty. \tcode{r.get() == nullptr}. \end{itemdescr} @@ -10151,18 +10379,22 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{shared_ptr} object that shares ownership with +\effects +Constructs a \tcode{shared_ptr} object that shares ownership with \tcode{r} and stores a copy of the pointer stored in \tcode{r}. If an exception is thrown, the constructor has no effect. \pnum -\ensures \tcode{use_count() == r.use_count()}. +\ensures +\tcode{use_count() == r.use_count()}. \pnum -\throws \tcode{bad_weak_ptr} when \tcode{r.expired()}. +\throws +\tcode{bad_weak_ptr} when \tcode{r.expired()}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*}. \end{itemdescr} @@ -10174,12 +10406,14 @@ \begin{itemdescr} \pnum -\remarks This constructor shall not participate in overload resolution +\remarks +This constructor shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*} and \tcode{unique_ptr::pointer} is convertible to \tcode{element_type*}. \pnum -\effects If \tcode{r.get() == nullptr}, equivalent to \tcode{shared_ptr()}. +\effects +If \tcode{r.get() == nullptr}, equivalent to \tcode{shared_ptr()}. Otherwise, if \tcode{D} is not a reference type, equivalent to \tcode{shared_ptr(r.release(), r.get_deleter())}. Otherwise, equivalent to \tcode{shared_ptr(r.release(), ref(r.get_deleter()))}. @@ -10228,10 +10462,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{shared_ptr(r).swap(*this)}. +\effects +Equivalent to \tcode{shared_ptr(r).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum \begin{note} @@ -10257,10 +10493,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{shared_ptr(std::move(r)).swap(*this)}. +\effects +Equivalent to \tcode{shared_ptr(std::move(r)).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{shared_ptr}% @@ -10270,10 +10508,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{shared_ptr(std::move(r)).swap(*this)}. +\effects +Equivalent to \tcode{shared_ptr(std::move(r)).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec3[util.smartptr.shared.mod]{Modifiers} @@ -10286,7 +10526,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the contents of \tcode{*this} and \tcode{r}. +\effects +Exchanges the contents of \tcode{*this} and \tcode{r}. \end{itemdescr} \indexlibrarymember{reset}{shared_ptr}% @@ -10296,7 +10537,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{shared_ptr().swap(*this)}. +\effects +Equivalent to \tcode{shared_ptr().swap(*this)}. \end{itemdescr} \indexlibrarymember{reset}{shared_ptr}% @@ -10306,7 +10548,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{shared_ptr(p).swap(*this)}. +\effects +Equivalent to \tcode{shared_ptr(p).swap(*this)}. \end{itemdescr} \indexlibrarymember{reset}{shared_ptr}% @@ -10316,7 +10559,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{shared_ptr(p, d).swap(*this)}. +\effects +Equivalent to \tcode{shared_ptr(p, d).swap(*this)}. \end{itemdescr} \indexlibrarymember{reset}{shared_ptr}% @@ -10326,7 +10570,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{shared_ptr(p, d, a).swap(*this)}. +\effects +Equivalent to \tcode{shared_ptr(p, d, a).swap(*this)}. \end{itemdescr} \rSec3[util.smartptr.shared.obs]{Observers} @@ -10337,7 +10582,8 @@ \begin{itemdescr} \pnum -\returns The stored pointer. +\returns +The stored pointer. \end{itemdescr} \indexlibrarymember{operator*}{shared_ptr}% @@ -10350,10 +10596,12 @@ \requires \tcode{get() != 0}. \pnum -\returns \tcode{*get()}. +\returns +\tcode{*get()}. \pnum -\remarks When \tcode{T} is an array type or \cv{}~\tcode{void}, +\remarks +When \tcode{T} is an array type or \cv{}~\tcode{void}, it is unspecified whether this member function is declared. If it is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the @@ -10370,10 +10618,12 @@ \requires \tcode{get() != 0}. \pnum -\returns \tcode{get()}. +\returns +\tcode{get()}. \pnum -\remarks When \tcode{T} is an array type, +\remarks +When \tcode{T} is an array type, it is unspecified whether this member function is declared. If it is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the definition) @@ -10391,17 +10641,20 @@ If \tcode{T} is \tcode{U[N]}, \tcode{i < N}. \pnum -\returns \tcode{get()[i]}. +\returns +\tcode{get()[i]}. \pnum -\remarks When \tcode{T} is not an array type, +\remarks +When \tcode{T} is not an array type, it is unspecified whether this member function is declared. If it is declared, it is unspecified what its return type is, except that the declaration (although not necessarily the definition) of the function shall be well-formed. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrarymember{use_count}{shared_ptr}% @@ -10411,12 +10664,14 @@ \begin{itemdescr} \pnum -\returns The number of \tcode{shared_ptr} objects, \tcode{*this} included, +\returns +The number of \tcode{shared_ptr} objects, \tcode{*this} included, that share ownership with \tcode{*this}, or \tcode{0} when \tcode{*this} is empty. \pnum -\sync None. +\sync +None. \pnum \begin{note} \tcode{get() == nullptr} @@ -10441,7 +10696,8 @@ \begin{itemdescr} \pnum -\returns \tcode{get() != 0}. +\returns +\tcode{get() != 0}. \end{itemdescr} \indexlibrarymember{owner_before}{shared_ptr}% @@ -10452,7 +10708,8 @@ \begin{itemdescr} \pnum -\returns An unspecified value such that +\returns +An unspecified value such that \begin{itemize} \item \tcode{x.owner_before(y)} defines a strict weak ordering as defined in~\ref{alg.sorting}; @@ -10494,7 +10751,8 @@ requirements (\tref{cpp17.allocator}). \pnum -\effects Allocates memory for an object of type \tcode{T} +\effects +Allocates memory for an object of type \tcode{T} (or \tcode{U[N]} when \tcode{T} is \tcode{U[]}, where \tcode{N} is determined from \placeholder{args} as specified by the concrete overload). The object is initialized from \placeholder{args} as specified by the concrete overload. @@ -10504,15 +10762,18 @@ If an exception is thrown, the functions have no effect. \pnum -\returns A \tcode{shared_ptr} instance that stores and owns the address of +\returns +A \tcode{shared_ptr} instance that stores and owns the address of the newly constructed object. \pnum -\ensures \tcode{r.get() != 0 \&\& r.use_count() == 1}, +\ensures +\tcode{r.get() != 0 \&\& r.use_count() == 1}, where \tcode{r} is the return value. \pnum -\throws \tcode{bad_alloc}, or +\throws +\tcode{bad_alloc}, or an exception thrown from \tcode{allocate} or from the initialization of the object. \pnum @@ -10621,11 +10882,13 @@ \begin{itemdescr} \pnum -\returns A \tcode{shared_ptr} to an object of type \tcode{T} +\returns +A \tcode{shared_ptr} to an object of type \tcode{T} with an initial value \tcode{T(forward(args)...)}. \pnum -\remarks These overloads shall only participate in overload resolution +\remarks +These overloads shall only participate in overload resolution when \tcode{T} is not an array type. The \tcode{shared_ptr} constructors called by these functions enable \tcode{shared_from_this} @@ -10652,12 +10915,14 @@ \begin{itemdescr} \pnum -\returns A \tcode{shared_ptr} to an object of type \tcode{U[N]} +\returns +A \tcode{shared_ptr} to an object of type \tcode{U[N]} with a default initial value, where \tcode{U} is \tcode{remove_extent_t}. \pnum -\remarks These overloads shall only participate in overload resolution +\remarks +These overloads shall only participate in overload resolution when \tcode{T} is of the form \tcode{U[]}. \pnum @@ -10682,11 +10947,13 @@ \begin{itemdescr} \pnum -\returns A \tcode{shared_ptr} to an object of type \tcode{T} +\returns +A \tcode{shared_ptr} to an object of type \tcode{T} with a default initial value. \pnum -\remarks These overloads shall only participate in overload resolution +\remarks +These overloads shall only participate in overload resolution when \tcode{T} is of the form \tcode{U[N]}. \pnum @@ -10713,12 +10980,14 @@ \begin{itemdescr} \pnum -\returns A \tcode{shared_ptr} to an object of type \tcode{U[N]}, +\returns +A \tcode{shared_ptr} to an object of type \tcode{U[N]}, where \tcode{U} is \tcode{remove_extent_t} and each array element has an initial value of \tcode{u}. \pnum -\remarks These overloads shall only participate in overload resolution +\remarks +These overloads shall only participate in overload resolution when \tcode{T} is of the form \tcode{U[]}. \pnum @@ -10746,12 +11015,14 @@ \begin{itemdescr} \pnum -\returns A \tcode{shared_ptr} to an object of type \tcode{T}, +\returns +A \tcode{shared_ptr} to an object of type \tcode{T}, where each array element of type \tcode{remove_extent_t} has an initial value of \tcode{u}. \pnum -\remarks These overloads shall only participate in overload resolution +\remarks +These overloads shall only participate in overload resolution when \tcode{T} is of the form \tcode{U[N]}. \pnum @@ -10836,7 +11107,8 @@ \begin{itemdescr} \pnum -\returns \tcode{a.get() == b.get()}. +\returns +\tcode{a.get() == b.get()}. \end{itemdescr} \indexlibrarymember{operator==}{shared_ptr}% @@ -10847,7 +11119,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!a}. +\returns +\tcode{!a}. \end{itemdescr} \indexlibrarymember{operator<=>}{shared_ptr}% @@ -10890,7 +11163,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{a.swap(b)}. +\effects +Equivalent to \tcode{a.swap(b)}. \end{itemdescr} \rSec3[util.smartptr.shared.cast]{Casts} @@ -11027,7 +11301,8 @@ \begin{itemdescr} \pnum -\returns If \tcode{p} owns a deleter \tcode{d} of type cv-unqualified +\returns +If \tcode{p} owns a deleter \tcode{d} of type cv-unqualified \tcode{D}, returns \tcode{addressof(d)}; otherwise returns \tcode{nullptr}. The returned pointer remains valid as long as there exists a \tcode{shared_ptr} instance @@ -11047,10 +11322,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{os <{}< p.get();} +\effects +As if by: \tcode{os <{}< p.get();} \pnum -\returns \tcode{os}. +\returns +\tcode{os}. \end{itemdescr} \rSec2[util.smartptr.weak]{Class template \tcode{weak_ptr}} @@ -11130,10 +11407,12 @@ \begin{itemdescr} \pnum -\effects Constructs an empty \tcode{weak_ptr} object. +\effects +Constructs an empty \tcode{weak_ptr} object. \pnum -\ensures \tcode{use_count() == 0}. +\ensures +\tcode{use_count() == 0}. \end{itemdescr} \indexlibrary{\idxcode{weak_ptr}!constructor}% @@ -11145,17 +11424,20 @@ \begin{itemdescr} \pnum -\remarks The second and third constructors shall not participate in +\remarks +The second and third constructors shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*}. \pnum -\effects If \tcode{r} is empty, constructs +\effects +If \tcode{r} is empty, constructs an empty \tcode{weak_ptr} object; otherwise, constructs a \tcode{weak_ptr} object that shares ownership with \tcode{r} and stores a copy of the pointer stored in \tcode{r}. \pnum -\ensures \tcode{use_count() == r.use_count()}. +\ensures +\tcode{use_count() == r.use_count()}. \end{itemdescr} \indexlibrary{\idxcode{weak_ptr}!constructor}% @@ -11166,14 +11448,17 @@ \begin{itemdescr} \pnum -\remarks The second constructor shall not participate in overload resolution unless +\remarks +The second constructor shall not participate in overload resolution unless \tcode{Y*} is compatible with \tcode{T*}. \pnum -\effects Move constructs a \tcode{weak_ptr} instance from \tcode{r}. +\effects +Move constructs a \tcode{weak_ptr} instance from \tcode{r}. \pnum -\ensures \tcode{*this} shall contain the old value of \tcode{r}. +\ensures +\tcode{*this} shall contain the old value of \tcode{r}. \tcode{r} shall be empty. \tcode{r.use_count() == 0}. \end{itemdescr} @@ -11186,7 +11471,8 @@ \begin{itemdescr} \pnum -\effects Destroys this \tcode{weak_ptr} object but has no +\effects +Destroys this \tcode{weak_ptr} object but has no effect on the object its stored pointer points to. \end{itemdescr} @@ -11201,14 +11487,17 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{weak_ptr(r).swap(*this)}. +\effects +Equivalent to \tcode{weak_ptr(r).swap(*this)}. \pnum -\remarks The implementation may meet the effects (and the +\remarks +The implementation may meet the effects (and the implied guarantees) via different means, without creating a temporary object. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{weak_ptr}% @@ -11219,10 +11508,12 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{weak_ptr(std::move(r)).swap(*this)}. +\effects +Equivalent to \tcode{weak_ptr(std::move(r)).swap(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \rSec3[util.smartptr.weak.mod]{Modifiers} @@ -11233,7 +11524,8 @@ \begin{itemdescr} \pnum -\effects Exchanges the contents of \tcode{*this} and \tcode{r}. +\effects +Exchanges the contents of \tcode{*this} and \tcode{r}. \end{itemdescr} \indexlibrarymember{reset}{weak_ptr}% @@ -11243,7 +11535,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{weak_ptr().swap(*this)}. +\effects +Equivalent to \tcode{weak_ptr().swap(*this)}. \end{itemdescr} \rSec3[util.smartptr.weak.obs]{Observers} @@ -11254,7 +11547,8 @@ \begin{itemdescr} \pnum -\returns \tcode{0} if \tcode{*this} is empty; +\returns +\tcode{0} if \tcode{*this} is empty; otherwise, the number of \tcode{shared_ptr} instances that share ownership with \tcode{*this}. \end{itemdescr} @@ -11266,7 +11560,8 @@ \begin{itemdescr} \pnum -\returns \tcode{use_count() == 0}. +\returns +\tcode{use_count() == 0}. \end{itemdescr} \indexlibrarymember{lock}{weak_ptr}% @@ -11276,7 +11571,8 @@ \begin{itemdescr} \pnum -\returns \tcode{expired() ?\ shared_ptr() :\ shared_ptr(*this)}, executed atomically. +\returns +\tcode{expired() ?\ shared_ptr() :\ shared_ptr(*this)}, executed atomically. \end{itemdescr} \indexlibrarymember{owner_before}{weak_ptr}% @@ -11287,7 +11583,8 @@ \begin{itemdescr} \pnum -\returns An unspecified value such that +\returns +An unspecified value such that \begin{itemize} \item \tcode{x.owner_before(y)} defines a strict weak ordering as defined in~\ref{alg.sorting}; @@ -11310,7 +11607,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to \tcode{a.swap(b)}. +\effects +Equivalent to \tcode{a.swap(b)}. \end{itemdescr} \rSec2[util.smartptr.ownerless]{Class template \tcode{owner_less}} @@ -11420,7 +11718,8 @@ \begin{itemdescr} \pnum -\effects Value-initializes \tcode{weak_this}. +\effects +Value-initializes \tcode{weak_this}. \end{itemdescr} \indexlibrarymember{operator=}{enable_shared_from_this}% @@ -11430,7 +11729,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum \begin{note} \tcode{weak_this} is not changed. \end{note} @@ -11445,7 +11745,8 @@ \begin{itemdescr} \pnum -\returns \tcode{shared_ptr(weak_this)}. +\returns +\tcode{shared_ptr(weak_this)}. \end{itemdescr} \indexlibrary{\idxcode{weak_ptr}}% @@ -11457,7 +11758,8 @@ \begin{itemdescr} \pnum -\returns \tcode{weak_this}. +\returns +\tcode{weak_this}. \end{itemdescr} \rSec2[util.smartptr.hash]{Smart pointer hash support} @@ -13464,7 +13766,8 @@ \begin{itemdescr} \pnum -\effects Value-initializes the \tcode{OuterAlloc} base class and the \tcode{inner} allocator +\effects +Value-initializes the \tcode{OuterAlloc} base class and the \tcode{inner} allocator object. \end{itemdescr} @@ -13476,13 +13779,15 @@ \begin{itemdescr} \pnum -\effects Initializes the \tcode{OuterAlloc} base class with +\effects +Initializes the \tcode{OuterAlloc} base class with \tcode{std::forward(outerAlloc)} and \tcode{inner} with \tcode{innerAllocs...} (hence recursively initializing each allocator within the adaptor with the corresponding allocator from the argument list). \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{is_constructible_v} is \tcode{true}. \end{itemdescr} @@ -13493,7 +13798,8 @@ \begin{itemdescr} \pnum -\effects Initializes each allocator within the adaptor with the corresponding allocator +\effects +Initializes each allocator within the adaptor with the corresponding allocator from \tcode{other}. \end{itemdescr} @@ -13504,7 +13810,8 @@ \begin{itemdescr} \pnum -\effects Move constructs each allocator within the adaptor with the corresponding allocator +\effects +Move constructs each allocator within the adaptor with the corresponding allocator from \tcode{other}. \end{itemdescr} @@ -13517,11 +13824,13 @@ \begin{itemdescr} \pnum -\effects Initializes each allocator within the adaptor with the corresponding allocator +\effects +Initializes each allocator within the adaptor with the corresponding allocator from \tcode{other}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{is_constructible_v} is \tcode{true}. \end{itemdescr} @@ -13533,11 +13842,13 @@ \begin{itemdescr} \pnum -\effects Initializes each allocator within the adaptor with the corresponding allocator rvalue +\effects +Initializes each allocator within the adaptor with the corresponding allocator rvalue from \tcode{other}. \pnum -\remarks This constructor shall not participate in overload resolution unless +\remarks +This constructor shall not participate in overload resolution unless \tcode{is_constructible_v} is \tcode{true}. \end{itemdescr} @@ -13566,7 +13877,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*this} if \tcode{sizeof...(InnerAllocs)} is zero; otherwise, +\returns +\tcode{*this} if \tcode{sizeof...(InnerAllocs)} is zero; otherwise, \tcode{inner}. \end{itemdescr} @@ -13577,7 +13889,8 @@ \begin{itemdescr} \pnum -\returns \tcode{static_cast(*this)}. +\returns +\tcode{static_cast(*this)}. \end{itemdescr} \indexlibrarymember{outer_allocator}{scoped_allocator_adaptor}% @@ -13587,7 +13900,8 @@ \begin{itemdescr} \pnum -\returns \tcode{static_cast(*this)}. +\returns +\tcode{static_cast(*this)}. \end{itemdescr} \indexlibrarymember{allocate}{scoped_allocator_adaptor}% @@ -13597,7 +13911,8 @@ \begin{itemdescr} \pnum -\returns \tcode{allocator_traits::allocate(outer_allocator(), n)}. +\returns +\tcode{allocator_traits::allocate(outer_allocator(), n)}. \end{itemdescr} \indexlibrarymember{allocate}{scoped_allocator_adaptor}% @@ -13607,7 +13922,8 @@ \begin{itemdescr} \pnum -\returns \tcode{allocator_traits::allocate(outer_allocator(), n, hint)}. +\returns +\tcode{allocator_traits::allocate(outer_allocator(), n, hint)}. \end{itemdescr} \indexlibrarymember{deallocate}{scoped_allocator_adaptor}% @@ -13617,7 +13933,8 @@ \begin{itemdescr} \pnum -\effects As if by: +\effects +As if by: \tcode{allocator_traits::deallocate(outer_allocator(), p, n);} \end{itemdescr} @@ -13628,7 +13945,8 @@ \begin{itemdescr} \pnum -\returns \tcode{allocator_traits::max_size(outer_allocator())}. +\returns +\tcode{allocator_traits::max_size(outer_allocator())}. \end{itemdescr} \indexlibrarymember{construct}{scoped_allocator_adaptor}% @@ -13660,7 +13978,8 @@ \begin{itemdescr} \pnum -\effects Calls \tcode{\placeholdernc{OUTERMOST_ALLOC_TRAITS}(*this)::destroy(\placeholdernc{OUTERMOST}(*this), p)}. +\effects +Calls \tcode{\placeholdernc{OUTERMOST_ALLOC_TRAITS}(*this)::destroy(\placeholdernc{OUTERMOST}(*this), p)}. \end{itemdescr} \indexlibrarymember{select_on_container_copy_construction}{scoped_allocator_adaptor}% @@ -13670,7 +13989,8 @@ \begin{itemdescr} \pnum -\returns A new \tcode{scoped_allocator_adaptor} object where each allocator \tcode{A} in the +\returns +A new \tcode{scoped_allocator_adaptor} object where each allocator \tcode{A} in the adaptor is initialized from the result of calling \tcode{allocator_traits::select_on_container_copy_construction()} on the corresponding allocator in \tcode{*this}. @@ -13687,7 +14007,8 @@ \begin{itemdescr} \pnum -\returns If \tcode{sizeof...(InnerAllocs)} is zero, +\returns +If \tcode{sizeof...(InnerAllocs)} is zero, \begin{codeblock} a.outer_allocator() == b.outer_allocator() \end{codeblock} @@ -14098,7 +14419,8 @@ \begin{itemdescr} \pnum -\remarks Let \tcode{\placeholdernc{FUN}} denote the exposition-only functions +\remarks +Let \tcode{\placeholdernc{FUN}} denote the exposition-only functions \begin{codeblock} void @\placeholdernc{FUN}@(T&) noexcept; void @\placeholdernc{FUN}@(T&&) = delete; @@ -14110,7 +14432,8 @@ is equivalent to \tcode{noexcept(\placeholdernc{FUN}(declval()))}. \pnum -\effects Creates a variable \tcode{r} +\effects +Creates a variable \tcode{r} as if by \tcode{T\& r = std::forward(u)}, then constructs a \tcode{reference_wrapper} object that stores a reference to \tcode{r}. @@ -14123,7 +14446,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{reference_wrapper} object that +\effects +Constructs a \tcode{reference_wrapper} object that stores a reference to \tcode{x.get()}. \end{itemdescr} @@ -14136,7 +14460,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{*this} stores a reference to \tcode{x.get()}. +\ensures +\tcode{*this} stores a reference to \tcode{x.get()}. \end{itemdescr} \rSec3[refwrap.access]{Access} @@ -14148,7 +14473,8 @@ \begin{itemdescr} \pnum -\returns The stored reference. +\returns +The stored reference. \end{itemdescr} \indexlibrarymember{get}{reference_wrapper}% @@ -14158,7 +14484,8 @@ \begin{itemdescr} \pnum -\returns The stored reference. +\returns +The stored reference. \end{itemdescr} \rSec3[refwrap.invoke]{Invocation} @@ -14176,7 +14503,8 @@ \tcode{T} is a complete type. \pnum -\returns \tcode{\placeholdernc{INVOKE}(get(), std::forward(args)...)}.\iref{func.require} +\returns +\tcode{\placeholdernc{INVOKE}(get(), std::forward(args)...)}.\iref{func.require} \end{itemdescr} @@ -14194,7 +14522,8 @@ \begin{itemdescr} \pnum -\returns \tcode{reference_wrapper(t)}. +\returns +\tcode{reference_wrapper(t)}. \end{itemdescr} \indexlibrarymember{ref}{reference_wrapper}% @@ -14204,7 +14533,8 @@ \begin{itemdescr} \pnum -\returns \tcode{ref(t.get())}. +\returns +\tcode{ref(t.get())}. \end{itemdescr} \indexlibrarymember{cref}{reference_wrapper}% @@ -14214,7 +14544,8 @@ \begin{itemdescr} \pnum -\returns \tcode{reference_wrapper (t)}. +\returns +\tcode{reference_wrapper (t)}. \end{itemdescr} \indexlibrarymember{cref}{reference_wrapper}% @@ -14224,7 +14555,8 @@ \begin{itemdescr} \pnum -\returns \tcode{cref(t.get())}. +\returns +\tcode{cref(t.get())}. \end{itemdescr} \rSec3[refwrap.unwrapref]{Transformation type trait \tcode{unwrap_reference}} @@ -14277,7 +14609,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x + y}. +\returns +\tcode{x + y}. \end{itemdescr} \indexlibrary{\idxcode{plus<>}}% @@ -14298,7 +14631,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) + std::forward(u)}. +\returns +\tcode{std::forward(t) + std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.minus]{Class template \tcode{minus}} @@ -14317,7 +14651,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x - y}. +\returns +\tcode{x - y}. \end{itemdescr} \indexlibrary{\idxcode{minus<>}}% @@ -14338,7 +14673,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) - std::forward(u)}. +\returns +\tcode{std::forward(t) - std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.multiplies]{Class template \tcode{multiplies}} @@ -14357,7 +14693,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x * y}. +\returns +\tcode{x * y}. \end{itemdescr} \indexlibrary{\idxcode{multiplies<>}}% @@ -14378,7 +14715,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) * std::forward(u)}. +\returns +\tcode{std::forward(t) * std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.divides]{Class template \tcode{divides}} @@ -14397,7 +14735,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x / y}. +\returns +\tcode{x / y}. \end{itemdescr} \indexlibrary{\idxcode{divides<>}}% @@ -14418,7 +14757,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) / std::forward(u)}. +\returns +\tcode{std::forward(t) / std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.modulus]{Class template \tcode{modulus}} @@ -14437,7 +14777,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x \% y}. +\returns +\tcode{x \% y}. \end{itemdescr} \indexlibrary{\idxcode{modulus<>}}% @@ -14458,7 +14799,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) \% std::forward(u)}. +\returns +\tcode{std::forward(t) \% std::forward(u)}. \end{itemdescr} \rSec3[arithmetic.operations.negate]{Class template \tcode{negate}} @@ -14477,7 +14819,8 @@ \begin{itemdescr} \pnum -\returns \tcode{-x}. +\returns +\tcode{-x}. \end{itemdescr} \indexlibrary{\idxcode{negate<>}}% @@ -14498,7 +14841,8 @@ \begin{itemdescr} \pnum -\returns \tcode{-std::forward(t)}. +\returns +\tcode{-std::forward(t)}. \end{itemdescr} @@ -14541,7 +14885,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x == y}. +\returns +\tcode{x == y}. \end{itemdescr} \indexlibrary{\idxcode{equal_to<>}}% @@ -14562,7 +14907,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) == std::forward(u)}. +\returns +\tcode{std::forward(t) == std::forward(u)}. \end{itemdescr} \rSec3[comparisons.not.equal.to]{Class template \tcode{not_equal_to}} @@ -14581,7 +14927,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x != y}. +\returns +\tcode{x != y}. \end{itemdescr} \indexlibrary{\idxcode{not_equal_to<>}}% @@ -14602,7 +14949,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) != std::forward(u)}. +\returns +\tcode{std::forward(t) != std::forward(u)}. \end{itemdescr} \rSec3[comparisons.greater]{Class template \tcode{greater}} @@ -14621,7 +14969,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x > y}. +\returns +\tcode{x > y}. \end{itemdescr} \indexlibrary{\idxcode{greater<>}}% @@ -14642,7 +14991,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) > std::forward(u)}. +\returns +\tcode{std::forward(t) > std::forward(u)}. \end{itemdescr} \rSec3[comparisons.less]{Class template \tcode{less}} @@ -14661,7 +15011,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x < y}. +\returns +\tcode{x < y}. \end{itemdescr} \indexlibrary{\idxcode{less<>}}% @@ -14682,7 +15033,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) < std::forward(u)}. +\returns +\tcode{std::forward(t) < std::forward(u)}. \end{itemdescr} \rSec3[comparisons.greater.equal]{Class template \tcode{greater_equal}} @@ -14701,7 +15053,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x >= y}. +\returns +\tcode{x >= y}. \end{itemdescr} \indexlibrary{\idxcode{greater_equal<>}}% @@ -14722,7 +15075,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) >= std::forward(u)}. +\returns +\tcode{std::forward(t) >= std::forward(u)}. \end{itemdescr} \rSec3[comparisons.less.equal]{Class template \tcode{less_equal}} @@ -14741,7 +15095,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x <= y}. +\returns +\tcode{x <= y}. \end{itemdescr} \indexlibrary{\idxcode{less_equal<>}}% @@ -14762,7 +15117,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) <= std::forward(u)}. +\returns +\tcode{std::forward(t) <= std::forward(u)}. \end{itemdescr} \rSec2[range.cmp]{Concept-constrained comparisons} @@ -14955,7 +15311,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x \&\& y}. +\returns +\tcode{x \&\& y}. \end{itemdescr} \indexlibrary{\idxcode{logical_and<>}}% @@ -14976,7 +15333,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) \&\& std::forward(u)}. +\returns +\tcode{std::forward(t) \&\& std::forward(u)}. \end{itemdescr} \rSec3[logical.operations.or]{Class template \tcode{logical_or}} @@ -14995,7 +15353,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x || y}. +\returns +\tcode{x || y}. \end{itemdescr} \indexlibrary{\idxcode{logical_or<>}}% @@ -15016,7 +15375,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) || std::forward(u)}. +\returns +\tcode{std::forward(t) || std::forward(u)}. \end{itemdescr} \rSec3[logical.operations.not]{Class template \tcode{logical_not}} @@ -15035,7 +15395,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!x}. +\returns +\tcode{!x}. \end{itemdescr} \indexlibrary{\idxcode{logical_not<>}}% @@ -15056,7 +15417,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!std::forward(t)}. +\returns +\tcode{!std::forward(t)}. \end{itemdescr} @@ -15083,7 +15445,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x \& y}. +\returns +\tcode{x \& y}. \end{itemdescr} \indexlibrary{\idxcode{bit_and<>}}% @@ -15104,7 +15467,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) \& std::forward(u)}. +\returns +\tcode{std::forward(t) \& std::forward(u)}. \end{itemdescr} \rSec3[bitwise.operations.or]{Class template \tcode{bit_or}} @@ -15123,7 +15487,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x | y}. +\returns +\tcode{x | y}. \end{itemdescr} \indexlibrary{\idxcode{bit_or<>}}% @@ -15144,7 +15509,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) | std::forward(u)}. +\returns +\tcode{std::forward(t) | std::forward(u)}. \end{itemdescr} \rSec3[bitwise.operations.xor]{Class template \tcode{bit_xor}} @@ -15163,7 +15529,8 @@ \begin{itemdescr} \pnum -\returns \tcode{x \caret{} y}. +\returns +\tcode{x \caret{} y}. \end{itemdescr} \indexlibrary{\idxcode{bit_xor<>}}% @@ -15184,7 +15551,8 @@ \begin{itemdescr} \pnum -\returns \tcode{std::forward(t) \caret{} std::forward(u)}. +\returns +\tcode{std::forward(t) \caret{} std::forward(u)}. \end{itemdescr} \rSec3[bitwise.operations.not]{Class template \tcode{bit_not}} @@ -15202,7 +15570,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\~{}x}. +\returns +\tcode{\~{}x}. \end{itemdescr} \indexlibrary{\idxcode{bit_not<>}}% @@ -15223,7 +15592,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\~{}std::forward(t)}. +\returns +\tcode{\~{}std::forward(t)}. \end{itemdescr} @@ -15471,7 +15841,8 @@ $\tcode{v}_1$, $\tcode{v}_2$, $\dotsc$, $\tcode{v}_N$ are determined as specified below. \pnum -\throws Any exception thrown by the initialization of +\throws +Any exception thrown by the initialization of the state entities of \tcode{g}. \pnum @@ -15564,7 +15935,8 @@ \begin{itemdescr} \pnum -\returns A simple call wrapper\iref{func.def} \tcode{fn} +\returns +A simple call wrapper\iref{func.def} \tcode{fn} with call pattern \tcode{invoke(pmd, call_args...)}, where \tcode{pmd} is the target object of \tcode{fn} of type \tcode{R T::*} direct-non-list-initialized with \tcode{pm}, and @@ -15601,7 +15973,8 @@ \indexlibrarymember{what}{bad_function_call}% \begin{itemdescr} \pnum -\returns An +\returns +An \impldef{return value of \tcode{bad_function_call::what}} \ntbs{}. \end{itemdescr} @@ -15700,7 +16073,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{!*this}. +\ensures +\tcode{!*this}. \end{itemdescr} \indexlibrary{\idxcode{function}!constructor}% @@ -15710,7 +16084,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{!*this}. +\ensures +\tcode{!*this}. \end{itemdescr} \indexlibrary{\idxcode{function}!constructor}% @@ -15720,11 +16095,13 @@ \begin{itemdescr} \pnum -\ensures \tcode{!*this} if \tcode{!f}; otherwise, +\ensures +\tcode{!*this} if \tcode{!f}; otherwise, \tcode{*this} targets a copy of \tcode{f.target()}. \pnum -\throws Shall not throw exceptions if \tcode{f}'s target is +\throws +Shall not throw exceptions if \tcode{f}'s target is a specialization of \tcode{reference_wrapper} or a function pointer. Otherwise, may throw \tcode{bad_alloc} or any exception thrown by the copy constructor of the stored callable object. @@ -15741,7 +16118,8 @@ \begin{itemdescr} \pnum -\ensures If \tcode{!f}, \tcode{*this} has no target; +\ensures +If \tcode{!f}, \tcode{*this} has no target; otherwise, the target of \tcode{*this} is equivalent to the target of \tcode{f} before the construction, and \tcode{f} is in a valid state with an unspecified value. @@ -15763,12 +16141,14 @@ \requires \tcode{F} shall be \oldconcept{CopyConstructible}. \pnum -\remarks This constructor template shall not participate in overload resolution unless +\remarks +This constructor template shall not participate in overload resolution unless \tcode{F} is Lvalue-Callable\iref{func.wrap.func} for argument types \tcode{ArgTypes...} and return type \tcode{R}. \pnum -\ensures \tcode{!*this} if any of the following hold: +\ensures +\tcode{!*this} if any of the following hold: \begin{itemize} \item \tcode{f} is a null function pointer value. \item \tcode{f} is a null member pointer value. @@ -15785,7 +16165,8 @@ reference to an object and a member function pointer. \end{note} \pnum -\throws Shall not throw exceptions when \tcode{f} is a function pointer +\throws +Shall not throw exceptions when \tcode{f} is a function pointer or a \tcode{reference_wrapper} for some \tcode{T}. Otherwise, may throw \tcode{bad_alloc} or any exception thrown by \tcode{F}'s copy or move constructor. @@ -15798,7 +16179,8 @@ \begin{itemdescr} \pnum -\remarks This deduction guide participates in overload resolution only if +\remarks +This deduction guide participates in overload resolution only if \tcode{\&F::operator()} is well-formed when treated as an unevaluated operand. In that case, if \tcode{decltype(\&F::operator())} is of the form \tcode{R(G::*)(A...)}~\cv{}~\tcode{\opt{\&}~\opt{noexcept}} @@ -15822,10 +16204,12 @@ \begin{itemdescr} \pnum -\effects As if by \tcode{function(f).swap(*this);} +\effects +As if by \tcode{function(f).swap(*this);} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{function}% @@ -15835,11 +16219,13 @@ \begin{itemdescr} \pnum -\effects Replaces the target of \tcode{*this} +\effects +Replaces the target of \tcode{*this} with the target of \tcode{f}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{function}% @@ -15849,13 +16235,16 @@ \begin{itemdescr} \pnum -\effects If \tcode{*this != nullptr}, destroys the target of \tcode{this}. +\effects +If \tcode{*this != nullptr}, destroys the target of \tcode{this}. \pnum -\ensures \tcode{!(*this)}. +\ensures +\tcode{!(*this)}. \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarymember{operator=}{function}% @@ -15865,13 +16254,16 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{function(std::forward(f)).swap(*this);} +\effects +As if by: \tcode{function(std::forward(f)).swap(*this);} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \pnum -\remarks This assignment operator shall not participate in overload +\remarks +This assignment operator shall not participate in overload resolution unless \tcode{decay_t} is Lvalue-Callable\iref{func.wrap.func} for argument types \tcode{ArgTypes...} and return type \tcode{R}. @@ -15884,10 +16276,12 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{function(f).swap(*this);} +\effects +As if by: \tcode{function(f).swap(*this);} \pnum -\returns \tcode{*this}. +\returns +\tcode{*this}. \end{itemdescr} \indexlibrary{\idxcode{function}!destructor}% @@ -15897,7 +16291,8 @@ \begin{itemdescr} \pnum -\effects If \tcode{*this != nullptr}, destroys the target of \tcode{this}. +\effects +If \tcode{*this != nullptr}, destroys the target of \tcode{this}. \end{itemdescr} \rSec4[func.wrap.func.mod]{Modifiers} @@ -15909,7 +16304,8 @@ \begin{itemdescr} \pnum -\effects Interchanges the targets of \tcode{*this} and \tcode{other}. +\effects +Interchanges the targets of \tcode{*this} and \tcode{other}. \end{itemdescr} \rSec4[func.wrap.func.cap]{Capacity} @@ -15921,7 +16317,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if \tcode{*this} has a target, otherwise \tcode{false}. +\returns +\tcode{true} if \tcode{*this} has a target, otherwise \tcode{false}. \end{itemdescr} \rSec4[func.wrap.func.inv]{Invocation} @@ -15934,7 +16331,8 @@ \begin{itemdescr} \pnum -\returns \tcode{\placeholdernc{INVOKE}(f, std::forward(args)...)}\iref{func.require}, +\returns +\tcode{\placeholdernc{INVOKE}(f, std::forward(args)...)}\iref{func.require}, where \tcode{f} is the target object\iref{func.def} of \tcode{*this}. \pnum @@ -15952,7 +16350,8 @@ \begin{itemdescr} \pnum -\returns If \tcode{*this} has a target of type \tcode{T}, +\returns +If \tcode{*this} has a target of type \tcode{T}, \tcode{typeid(T)}; otherwise, \tcode{typeid(void)}. \end{itemdescr} @@ -15964,7 +16363,8 @@ \begin{itemdescr} \pnum -\returns If \tcode{target_type() == typeid(T)} +\returns +If \tcode{target_type() == typeid(T)} a pointer to the stored function target; otherwise a null pointer. \end{itemdescr} @@ -15978,7 +16378,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!f}. +\returns +\tcode{!f}. \end{itemdescr} \rSec4[func.wrap.func.alg]{Specialized algorithms} @@ -15991,7 +16392,8 @@ \begin{itemdescr} \pnum -\effects As if by: \tcode{f1.swap(f2);} +\effects +As if by: \tcode{f1.swap(f2);} \end{itemdescr}% \indextext{function object!wrapper|)} @@ -18504,10 +18906,12 @@ \begin{itemdescr} \pnum -\mandates \tcode{S} is a complete type. +\mandates +\tcode{S} is a complete type. \pnum -\returns \tcode{true} if and only if +\returns +\tcode{true} if and only if \tcode{S} is a standard-layout type, \tcode{M} is an object type, \tcode{m} is not null, @@ -18524,10 +18928,12 @@ \begin{itemdescr} \pnum -\mandates \tcode{S1} and \tcode{S2} are complete types. +\mandates +\tcode{S1} and \tcode{S2} are complete types. \pnum -\returns \tcode{true} if and only if +\returns +\tcode{true} if and only if \tcode{S1} and \tcode{S2} are standard-layout types, \tcode{M1} and \tcode{M2} are object types, \tcode{m1} and \tcode{m2} are not null, @@ -18570,7 +18976,8 @@ \begin{itemdescr} \pnum -\returns \tcode{true} if and only if evaluation of the call occurs +\returns +\tcode{true} if and only if evaluation of the call occurs within the evaluation of an expression or conversion that is manifestly constant-evaluated\iref{expr.const}. @@ -18876,7 +19283,8 @@ \begin{itemdescr} \pnum -\effects Constructs a \tcode{type_index} object, the equivalent of \tcode{target = \&rhs}. +\effects +Constructs a \tcode{type_index} object, the equivalent of \tcode{target = \&rhs}. \end{itemdescr} \indexlibrarymember{operator==}{type_index}% @@ -18886,7 +19294,8 @@ \begin{itemdescr} \pnum -\returns \tcode{*target == *rhs.target}. +\returns +\tcode{*target == *rhs.target}. \end{itemdescr} \indexlibrarymember{operator<}{type_index}% @@ -18896,7 +19305,8 @@ \begin{itemdescr} \pnum -\returns \tcode{target->before(*rhs.target)}. +\returns +\tcode{target->before(*rhs.target)}. \end{itemdescr} \indexlibrarymember{operator>}{type_index}% @@ -18906,7 +19316,8 @@ \begin{itemdescr} \pnum -\returns \tcode{rhs.target->before(*target)}. +\returns +\tcode{rhs.target->before(*target)}. \end{itemdescr} \indexlibrarymember{operator<=}{type_index}% @@ -18916,7 +19327,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!rhs.target->before(*target)}. +\returns +\tcode{!rhs.target->before(*target)}. \end{itemdescr} \indexlibrarymember{operator>=}{type_index}% @@ -18926,7 +19338,8 @@ \begin{itemdescr} \pnum -\returns \tcode{!target->before(*rhs.target)}. +\returns +\tcode{!target->before(*rhs.target)}. \end{itemdescr} \indexlibrarymember{operator<=>}{type_index}% @@ -18952,7 +19365,8 @@ \begin{itemdescr} \pnum -\returns \tcode{target->hash_code()}. +\returns +\tcode{target->hash_code()}. \end{itemdescr} \indexlibrarymember{name}{type_index}% @@ -18962,7 +19376,8 @@ \begin{itemdescr} \pnum -\returns \tcode{target->name()}. +\returns +\tcode{target->name()}. \end{itemdescr} \rSec2[type.index.hash]{Hash support} @@ -19309,7 +19724,8 @@ \requires \tcode{base} has a value between 2 and 36 (inclusive). \pnum -\effects The value of \tcode{value} is converted +\effects +The value of \tcode{value} is converted to a string of digits in the given base (with no redundant leading zeroes). Digits in the range 10..35 (inclusive) @@ -19318,7 +19734,8 @@ the representation starts with \tcode{'-'}. \pnum -\throws Nothing. +\throws +Nothing. \pnum \remarks @@ -19337,7 +19754,8 @@ \begin{itemdescr} \pnum -\effects \tcode{value} is converted to a string +\effects +\tcode{value} is converted to a string in the style of \tcode{printf} in the \tcode{"C"} locale. The conversion specifier is \tcode{f} or \tcode{e}, @@ -19346,7 +19764,8 @@ a tie is resolved in favor of \tcode{f}. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrary{\idxcode{to_chars}}% @@ -19362,12 +19781,14 @@ one of the enumerators of \tcode{chars_format}. \pnum -\effects \tcode{value} is converted to a string +\effects +\tcode{value} is converted to a string in the style of \tcode{printf} in the \tcode{"C"} locale. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \indexlibrary{\idxcode{to_chars}}% @@ -19386,13 +19807,15 @@ one of the enumerators of \tcode{chars_format}. \pnum -\effects \tcode{value} is converted to a string +\effects +\tcode{value} is converted to a string in the style of \tcode{printf} in the \tcode{"C"} locale with the given precision. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \xrefc{7.21.6.1} @@ -19443,7 +19866,8 @@ \requires \tcode{base} has a value between 2 and 36 (inclusive). \pnum -\effects The pattern is the expected form of the subject sequence +\effects +The pattern is the expected form of the subject sequence in the \tcode{"C"} locale for the given nonzero base, as described for \tcode{strtol}, @@ -19454,7 +19878,8 @@ and only if \tcode{value} has a signed type. \pnum -\throws Nothing. +\throws +Nothing. \pnum \remarks @@ -19480,7 +19905,8 @@ one of the enumerators of \tcode{chars_format}. \pnum -\effects The pattern is the expected form of the subject sequence +\effects +The pattern is the expected form of the subject sequence in the \tcode{"C"} locale, as described for \tcode{strtod}, except that @@ -19510,7 +19936,8 @@ closest to the value of the string matching the pattern. \pnum -\throws Nothing. +\throws +Nothing. \end{itemdescr} \xrefc{7.22.1.3, 7.22.1.4} @@ -20246,7 +20673,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return vformat(fmt, make_format_args(args...)); \end{codeblock} @@ -20260,7 +20688,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return vformat(fmt, make_wformat_args(args...)); \end{codeblock} @@ -20274,7 +20703,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return vformat(loc, fmt, make_format_args(args...)); \end{codeblock} @@ -20288,7 +20718,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} return vformat(loc, fmt, make_wformat_args(args...)); \end{codeblock} @@ -20325,7 +20756,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} using context = basic_format_context; return vformat_to(out, fmt, {make_format_args(args...)}); @@ -20342,7 +20774,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \begin{codeblock} using context = basic_format_context; return vformat_to(out, loc, fmt, {make_format_args(args...)}); @@ -20792,7 +21225,8 @@ \tcode{end()} is reachable from \tcode{it}. \pnum -\effects Equivalent to: \tcode{begin_ = it;} +\effects +Equivalent to: \tcode{begin_ = it;} \end{itemdescr} \indexlibrarymember{next_arg_id}{basic_format_parse_context}% @@ -20944,7 +21378,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{out_ = it;} +\effects +Equivalent to: \tcode{out_ = it;} \end{itemdescr} \indextext{left-pad}% @@ -21059,7 +21494,8 @@ \begin{itemdescr} \pnum -\ensures \tcode{!(*this)}. +\ensures +\tcode{!(*this)}. \end{itemdescr} \begin{itemdecl} @@ -21126,7 +21562,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{value} with \tcode{n}. +\effects +Initializes \tcode{value} with \tcode{n}. \end{itemdescr} \begin{itemdecl} @@ -21139,7 +21576,8 @@ \tcode{s} points to a NTCTS\iref{defns.ntcts}. \pnum -\effects Initializes \tcode{value} with \tcode{s}. +\effects +Initializes \tcode{value} with \tcode{s}. \end{itemdescr} \begin{itemdecl} @@ -21149,7 +21587,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{value} with \tcode{s}. +\effects +Initializes \tcode{value} with \tcode{s}. \end{itemdescr} \begin{itemdecl} @@ -21160,7 +21599,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{value} with +\effects +Initializes \tcode{value} with \tcode{basic_string_view(s.data(), s.size())}. \end{itemdescr} @@ -21170,7 +21610,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{value} with +\effects +Initializes \tcode{value} with \tcode{static_cast(nullptr)}. \end{itemdescr} @@ -21184,7 +21625,8 @@ \tcode{is_void_v} is \tcode{true}. \pnum -\effects Initializes \tcode{value} with \tcode{p}. +\effects +Initializes \tcode{value} with \tcode{p}. \pnum \begin{note} @@ -21258,7 +21700,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{format_(parse_ctx, format_ctx, ptr_);} +\effects +Equivalent to: \tcode{format_(parse_ctx, format_ctx, ptr_);} \end{itemdescr} \indexlibrary{\idxcode{visit_format_arg}}% @@ -21269,7 +21712,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: \tcode{return visit(forward(vis), arg.value);} +\effects +Equivalent to: \tcode{return visit(forward(vis), arg.value);} \end{itemdescr} \rSec3[format.arg.store]{Class template \exposid{format-arg-store}} @@ -21313,7 +21757,8 @@ \begin{itemdescr} \pnum -\effects Equivalent to: +\effects +Equivalent to: \tcode{return make_format_args(args...);} \end{itemdescr} @@ -21348,7 +21793,8 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{size_} with \tcode{0}. +\effects +Initializes \tcode{size_} with \tcode{0}. \end{itemdescr} \indexlibrary{\idxcode{basic_format_args}!constructor}% @@ -21359,7 +21805,8 @@ \begin{itemdescr} \pnum -\effects Initializes +\effects +Initializes \tcode{size_} with \tcode{sizeof...(Args)} and \tcode{data_} with \tcode{store.args.data()}. \end{itemdescr} From 4d6693c0da0ab3fd9b14f039e61d2b55f7e34bd6 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Tue, 10 Sep 2019 23:21:03 +0200 Subject: [PATCH 26/99] [std] Start a new line for \begin{example} --- source/atomics.tex | 9 +++-- source/basic.tex | 77 ++++++++++++++++++++++++++++------------- source/classes.tex | 42 ++++++++++++++-------- source/declarations.tex | 33 ++++++++++++------ source/expressions.tex | 10 ++++-- source/future.tex | 4 ++- source/iostreams.tex | 25 ++++++++----- source/lex.tex | 19 ++++++---- source/lib-intro.tex | 13 ++++--- source/numerics.tex | 12 ++++--- source/overloading.tex | 18 ++++++---- source/preprocessor.tex | 6 ++-- source/templates.tex | 24 ++++++++----- source/time.tex | 6 ++-- source/utilities.tex | 12 ++++--- 15 files changed, 209 insertions(+), 101 deletions(-) diff --git a/source/atomics.tex b/source/atomics.tex index df94ccb82c..f89dd4b6ad 100644 --- a/source/atomics.tex +++ b/source/atomics.tex @@ -1660,7 +1660,8 @@ initialization-compatible with \tcode{value}. \begin{note} This operation may need to initialize locks. \end{note} Concurrent access to the variable being initialized, even via an atomic operation, -constitutes a data race. \begin{example} +constitutes a data race. +\begin{example} \begin{codeblock} atomic v = ATOMIC_VAR_INIT(5); \end{codeblock} @@ -1887,7 +1888,8 @@ memcpy(expected, this, sizeof(*this)); \end{codeblock} \end{note} -\begin{example} The expected use of the compare-and-exchange operations is as follows. The +\begin{example} +The expected use of the compare-and-exchange operations is as follows. The compare-and-exchange operations will update \tcode{expected} when another iteration of the loop is needed. \begin{codeblock} @@ -1897,7 +1899,8 @@ } while (!current.compare_exchange_weak(expected, desired)); \end{codeblock} \end{example} -\begin{example} Because the expected value is updated only on failure, +\begin{example} +Because the expected value is updated only on failure, code releasing the memory containing the \tcode{expected} value on success will work. For example, list head insertion will act atomically and would not introduce a data race in the following code: diff --git a/source/basic.tex b/source/basic.tex index dba9f2fc33..8fc7b09a75 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -184,7 +184,8 @@ \grammarterm{declaration} is not a definition. \end{itemize} A declaration is said to be a \defn{definition} of each entity that it defines. -\begin{example} All but one of the following are definitions: +\begin{example} +All but one of the following are definitions: \begin{codeblock} int a; // defines \tcode{a} extern const int c = 1; // defines \tcode{c} @@ -223,7 +224,8 @@ copy assignment operator, move assignment operator\iref{class.copy.assign}, or destructor\iref{class.dtor} member functions. \end{note} -\begin{example} Given +\begin{example} +Given \begin{codeblock} #include @@ -495,7 +497,8 @@ \indextext{type!incomplete}% A definition of a class is required to be reachable in every context in which the class is used in a way that requires the class type to be complete. -\begin{example} The following complete translation unit is well-formed, +\begin{example} +The following complete translation unit is well-formed, even though it never defines \tcode{X}: \begin{codeblock} @@ -822,7 +825,8 @@ \indextext{point of!declaration|see{declaration, point of}}% The \defnx{point of declaration}{declaration!point of} for a name is immediately after its complete declarator\iref{dcl.decl} and before its -\grammarterm{initializer} (if any), except as noted below. \begin{example} +\grammarterm{initializer} (if any), except as noted below. +\begin{example} \begin{codeblock} unsigned char x = 12; @@ -836,7 +840,8 @@ \begin{note} \indextext{name hiding}% A name from an outer scope remains visible up -to the point of declaration of the name that hides it. \begin{example} +to the point of declaration of the name that hides it. +\begin{example} \begin{codeblock} const int i = 2; @@ -864,7 +869,8 @@ \pnum \indextext{declaration!enumerator point of}% The point of declaration for an enumerator is immediately after its -\grammarterm{enumerator-definition}. \begin{example} +\grammarterm{enumerator-definition}. +\begin{example} \begin{codeblock} const int x = 12; @@ -944,7 +950,8 @@ \pnum The point of declaration for a template parameter is immediately after its complete -\grammarterm{template-parameter}. \begin{example} +\grammarterm{template-parameter}. +\begin{example} \begin{codeblock} typedef unsigned char T; @@ -1234,7 +1241,8 @@ parameter names belong to this declarative region; any other kind of name introduced by the \grammarterm{declaration} of a \grammarterm{template-declaration} is instead introduced into the same declarative region where it would be introduced as a result of -a non-template declaration of the same name. \begin{example} +a non-template declaration of the same name. +\begin{example} \begin{codeblock} namespace N { @@ -1283,7 +1291,8 @@ The declarative region of the name of a template parameter is nested within the immediately-enclosing declarative region. \begin{note} As a result, a \grammarterm{template-parameter} hides any entity with the same name in an enclosing -scope\iref{basic.scope.hiding}. \begin{example} +scope\iref{basic.scope.hiding}. +\begin{example} \begin{codeblock} typedef int N; @@ -1638,7 +1647,8 @@ \grammarterm{template-argument} in the \grammarterm{declarator-id}, the look up is as described for unqualified names in the definition of the class -granting friendship. \begin{example} +granting friendship. +\begin{example} \begin{codeblock} struct A { @@ -1956,7 +1966,8 @@ lookup of the name preceding that \tcode{::} considers only namespaces, types, and templates whose specializations are types. If the name found does not designate a namespace or a class, enumeration, or dependent type, -the program is ill-formed. \begin{example} +the program is ill-formed. +\begin{example} \begin{codeblock} class A { @@ -1981,7 +1992,8 @@ \grammarterm{qualified-id}, names used before the \grammarterm{qualified-id} being declared are looked up in the defining namespace scope; names following the \grammarterm{qualified-id} are looked up in the scope of the -member's class or namespace. \begin{example} +member's class or namespace. +\begin{example} \begin{codeblock} class X { }; @@ -2154,7 +2166,8 @@ is the required set of declarations of \tcode{m}. Otherwise if the use of \tcode{m} is not one that allows a unique declaration to be chosen from -$S(X, m)$, the program is ill-formed. \begin{example} +$S(X, m)$, the program is ill-formed. +\begin{example} \begin{codeblock} int x; @@ -2341,7 +2354,8 @@ \end{example} However, in such namespace member declarations, the \grammarterm{nested-name-specifier} may rely on \grammarterm{using-directive}{s} to implicitly provide the initial part of the -\grammarterm{nested-name-specifier}. \begin{example} +\grammarterm{nested-name-specifier}. +\begin{example} \begin{codeblock} namespace A { @@ -2471,7 +2485,8 @@ \grammarterm{postfix-expression}. If the type \tcode{T} of the object expression is of a class type \tcode{C}, the \grammarterm{type-name} is also looked up in the scope of class \tcode{C}. At least one of the -lookups shall find a name that refers to \cv{}~\tcode{T}. \begin{example} +lookups shall find a name that refers to \cv{}~\tcode{T}. +\begin{example} \begin{codeblock} struct A { }; @@ -2744,7 +2759,8 @@ When a block scope declaration of an entity with linkage is not found to refer to some other declaration, then that entity is a member of the innermost enclosing namespace. However such a declaration does not -introduce the member name in its namespace scope. \begin{example} +introduce the member name in its namespace scope. +\begin{example} \begin{codeblock} namespace X { @@ -2893,7 +2909,8 @@ width. \end{note} \pnum -\begin{example} A class declared as +\begin{example} +A class declared as \begin{codeblock} struct { @@ -3357,7 +3374,8 @@ the program must ensure that an object of the original type occupies that same storage location when the implicit destructor call takes place; otherwise the behavior of the program is undefined. This is true -even if the block is exited with an exception. \begin{example} +even if the block is exited with an exception. +\begin{example} \begin{codeblock} class T { }; @@ -3930,7 +3948,8 @@ all contexts, which is equal to \tcode{alignof(std::max_align_t)}\iref{support.types}. The alignment required for a type might be different when it is used as the type -of a complete object and when it is used as the type of a subobject. \begin{example} +of a complete object and when it is used as the type of a subobject. +\begin{example} \begin{codeblock} struct B { long double d; }; struct D : virtual B { char c; }; @@ -4055,7 +4074,8 @@ when a prvalue that has type other than \cv{}~\tcode{void} appears as a discarded-value expression\iref{expr.prop}. \end{itemize} \end{note} -\begin{example} Consider the following code: +\begin{example} +Consider the following code: \begin{codeblock} class X { public: @@ -4396,7 +4416,8 @@ functions\iref{headers} \tcode{std::memcpy} or \tcode{std::memmove}.} If the content of that array is copied back into the object, the object shall -subsequently hold its original value. \begin{example} +subsequently hold its original value. +\begin{example} \begin{codeblock} #define N sizeof(T) char buf[N]; @@ -4414,7 +4435,8 @@ \tcode{obj1} are copied into \tcode{obj2},\footnote{By using, for example, the library functions\iref{headers} \tcode{std::memcpy} or \tcode{std::memmove}.} \tcode{obj2} shall subsequently hold the same value as -\tcode{obj1}. \begin{example} +\tcode{obj1}. +\begin{example} \begin{codeblock} T* t1p; @@ -4471,7 +4493,8 @@ those two points (``array of unknown bound of \tcode{T}'' and ``array of \tcode{N} \tcode{T}'') are different types. The type of a pointer to array of unknown bound, or of a type defined by a \tcode{typedef} declaration to -be an array of unknown bound, cannot be completed. \begin{example} +be an array of unknown bound, cannot be completed. +\begin{example} \indextext{type!example of incomplete}% \begin{codeblock} @@ -4919,7 +4942,9 @@ an object type. \end{note} The type of a pointer that can designate a function is called a \defn{function pointer type}. A pointer to objects of type \tcode{T} is referred to as a ``pointer to -\tcode{T}''. \begin{example} A pointer to an object of type \tcode{int} is +\tcode{T}''. +\begin{example} +A pointer to an object of type \tcode{int} is referred to as ``pointer to \tcode{int}'' and a pointer to an object of class \tcode{X} is called a ``pointer to \tcode{X}''. \end{example} Except for pointers to static members, text referring to ``pointers'' @@ -6095,7 +6120,9 @@ or that declares the name \tcode{main} with C language linkage (in any namespace) is ill-formed. The name \tcode{main} is -not otherwise reserved. \begin{example} Member functions, classes, and +not otherwise reserved. +\begin{example} +Member functions, classes, and enumerations can be called \tcode{main}, as can entities in other namespaces. \end{example} diff --git a/source/classes.tex b/source/classes.tex index 1cb17a67f5..859b6d0920 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -100,7 +100,8 @@ the program is ill-formed. Whenever a \grammarterm{class-key} is followed by a \grammarterm{class-head-name}, the \grammarterm{identifier} \tcode{final}, and a colon or left brace, \tcode{final} is -interpreted as a \grammarterm{class-virt-specifier}. \begin{example} +interpreted as a \grammarterm{class-virt-specifier}. +\begin{example} \begin{codeblock} struct A; struct A final {}; // OK: definition of \tcode{struct A}, @@ -1510,7 +1511,8 @@ \tcode{volatile X\&\&}, or \tcode{const volatile X\&\&}, and either there are no other parameters or else all other parameters have default arguments\iref{dcl.fct.default}. -\begin{example} \tcode{Y::Y(Y\&\&)} is a move constructor. +\begin{example} +\tcode{Y::Y(Y\&\&)} is a move constructor. \begin{codeblock} struct Y { Y(const Y&); @@ -1908,7 +1910,8 @@ \tcode{X} does not have a user-declared destructor. \end{itemize} -\begin{example} The class definition +\begin{example} +The class definition \begin{codeblock} struct S { int a; @@ -3183,7 +3186,8 @@ be implicitly deleted\iref{dcl.fct.def.delete} for the union. \end{note} \pnum -\begin{example} Consider the following union: +\begin{example} +Consider the following union: \begin{codeblock} union U { @@ -3856,7 +3860,8 @@ \pnum If a virtual function \tcode{f} in some class \tcode{B} is marked with the \grammarterm{virt-specifier} \tcode{final} and in a class \tcode{D} derived from \tcode{B} -a function \tcode{D::f} overrides \tcode{B::f}, the program is ill-formed. \begin{example} +a function \tcode{D::f} overrides \tcode{B::f}, the program is ill-formed. +\begin{example} \begin{codeblock} struct B { virtual void f() const final; @@ -3870,7 +3875,8 @@ \pnum If a virtual function is marked with the \grammarterm{virt-specifier} \tcode{override} and -does not override a member function of a base class, the program is ill-formed. \begin{example} +does not override a member function of a base class, the program is ill-formed. +\begin{example} \begin{codeblock} struct B { virtual void f(int); @@ -4659,7 +4665,8 @@ \pnum The names in a default \grammarterm{template-argument}\iref{temp.param} have their access checked in the context in which they appear rather than at any -points of use of the default \grammarterm{template-argument}. \begin{example} +points of use of the default \grammarterm{template-argument}. +\begin{example} \begin{codeblock} class B { }; template class C { @@ -5099,7 +5106,8 @@ Declaring a class to be a friend implies that the names of private and protected members from the class granting friendship can be accessed in the \grammarterm{base-specifier}{s} and member declarations of the befriended -class. \begin{example} +class. +\begin{example} \begin{codeblock} class A { @@ -5133,7 +5141,8 @@ \end{codeblock} \end{example} -A class shall not be defined in a friend declaration. \begin{example} +A class shall not be defined in a friend declaration. +\begin{example} \begin{codeblock} class A { friend class B { }; // error: cannot define class in friend declaration @@ -5156,7 +5165,8 @@ (\ref{temp}, \ref{temp.friend}).\end{note} If the type specifier in a \tcode{friend} declaration designates a (possibly cv-qualified) class type, that class is declared as a friend; otherwise, the -friend declaration is ignored. \begin{example} +friend declaration is ignored. +\begin{example} \begin{codeblock} class C; @@ -5547,7 +5557,8 @@ \indextext{constructor!array of class objects and}% An object of class type can also be initialized by a \grammarterm{braced-init-list}. List-initialization semantics apply; -see~\ref{dcl.init} and~\ref{dcl.init.list}. \begin{example} +see~\ref{dcl.init} and~\ref{dcl.init.list}. +\begin{example} \begin{codeblock} complex v[6] = { 1, complex(1,2), complex(), 2 }; @@ -5728,7 +5739,8 @@ The target constructor is selected by overload resolution. Once the target constructor returns, the body of the delegating constructor is executed. If a constructor delegates to itself directly or indirectly, -the program is ill-formed, no diagnostic required. \begin{example} +the program is ill-formed, no diagnostic required. +\begin{example} \begin{codeblock} struct C { @@ -5867,7 +5879,8 @@ and a \grammarterm{mem-initializer}, the initialization specified by the \grammarterm{mem-initializer} is performed, and the non-static data member's default member initializer is ignored. -\begin{example} Given +\begin{example} +Given % The comment below is misrendered with an overly large space before 'effects' % if left to listings (see NB US-26 (C++17 CD)) (possibly due to the ff % ligature), so we fix it up manually. @@ -6094,7 +6107,8 @@ A \grammarterm{mem-initializer} followed by an ellipsis is a pack expansion\iref{temp.variadic} that initializes the base classes specified by a pack expansion in the \grammarterm{base-specifier-list} -for the class. \begin{example} +for the class. +\begin{example} \begin{codeblock} template diff --git a/source/declarations.tex b/source/declarations.tex index 154d27902b..8567d877b7 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -111,7 +111,8 @@ \begin{note} In the declaration for an entity, attributes appertaining to that entity may appear at the start of the declaration and after the \grammarterm{declarator-id} for that declaration. -\end{note} \begin{example} +\end{note} +\begin{example} \begin{codeblock} [[noreturn]] void f [[noreturn]] (); // OK \end{codeblock} @@ -657,7 +658,8 @@ entity that can be referenced using an \grammarterm{elaborated-type-specifier}, the entity can continue to be referenced by an \grammarterm{elaborated-type-specifier} or as an enumeration or class name -in an enumeration or class definition respectively. \begin{example} +in an enumeration or class definition respectively. +\begin{example} \begin{codeblock} struct S; typedef struct S S; @@ -1550,7 +1552,8 @@ and either the \tcode{class} or \tcode{struct} \grammarterm{class-key} shall be used to refer to a class\iref{class} declared using the \tcode{class} or \tcode{struct} -\grammarterm{class-key}. \begin{example} +\grammarterm{class-key}. +\begin{example} \begin{codeblock} enum class E { a, b }; @@ -1998,7 +2001,8 @@ placeholder alone. The type deduced for \tcode{T} is determined as described in~\ref{dcl.type.simple}, as though \tcode{e} had -been the operand of the \tcode{decltype}. \begin{example} +been the operand of the \tcode{decltype}. +\begin{example} \begin{codeblock} int i; int&& f(); @@ -5821,7 +5825,8 @@ \begin{note} A constructor or conversion function selected for the copy shall be accessible\iref{class.access} in the context of the initializer list. \end{note} -If a narrowing conversion is required to initialize any of the elements, the program is ill-formed. \begin{example} +If a narrowing conversion is required to initialize any of the elements, the program is ill-formed. +\begin{example} \begin{codeblock} struct X { X(std::initializer_list v); @@ -5899,7 +5904,8 @@ \end{itemize} \begin{note} As indicated above, such conversions are not allowed at the top level in -list-initializations.\end{note} \begin{example} +list-initializations.\end{note} +\begin{example} \begin{codeblock} int x = 999; // \tcode{x} is not a constant expression @@ -6200,7 +6206,8 @@ constitute a reference. \end{note} \pnum -\begin{example} One can prevent default initialization and +\begin{example} +One can prevent default initialization and initialization by non-\tcode{double}s with \begin{codeblock} struct onlydouble { @@ -6735,7 +6742,8 @@ is parsed as part of an \grammarterm{enum-base}. \begin{note} This resolves a potential ambiguity between the declaration of an enumeration with an \grammarterm{enum-base} and the declaration of an unnamed bit-field of enumeration -type. \begin{example} +type. +\begin{example} \begin{codeblock} struct S { @@ -6939,7 +6947,8 @@ Each scoped \grammarterm{enumerator} is declared in the scope of the enumeration. These names obey the scope rules defined for all names -in~\ref{basic.scope} and~\ref{basic.lookup}. \begin{example} +in~\ref{basic.scope} and~\ref{basic.lookup}. +\begin{example} \begin{codeblock} enum direction { left='l', right='r' }; @@ -8578,7 +8587,8 @@ an \grammarterm{attribute-argument-clause}. \begin{note} If two consecutive left square brackets appear where an \grammarterm{attribute-specifier} is not allowed, the program is ill-formed even -if the brackets match an alternative grammar production. \end{note} \begin{example} +if the brackets match an alternative grammar production. \end{note} +\begin{example} \begin{codeblock} int p[10]; void f() { @@ -8668,7 +8678,8 @@ \end{example} \pnum -\begin{example} An aligned buffer with an alignment requirement +\begin{example} +An aligned buffer with an alignment requirement of \tcode{A} and holding \tcode{N} elements of type \tcode{T} can be declared as: \begin{codeblock} diff --git a/source/expressions.tex b/source/expressions.tex index ae70f5e7ff..23cd7be123 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -6779,7 +6779,9 @@ the result is a temporary expression. \pnum -In contexts where comma is given a special meaning, \begin{example} in +In contexts where comma is given a special meaning, +\begin{example} +in lists of arguments to functions\iref{expr.call} and lists of initializers\iref{dcl.init} \end{example} the comma operator as described in this subclause can appear only in parentheses. @@ -7148,7 +7150,8 @@ integral constant expression is required, then that expression is contextually implicitly converted\iref{conv} to an integral or unscoped enumeration type -and the selected conversion function shall be \tcode{constexpr}. \begin{example} +and the selected conversion function shall be \tcode{constexpr}. +\begin{example} \begin{codeblock} struct A { constexpr A(int i) : val(i) { } @@ -7252,7 +7255,8 @@ evaluation of the same expression (or the same operations on the same values) during program execution.\footnote{Nonetheless, implementations should provide consistent results, irrespective of whether the evaluation was performed during translation and/or during program -execution.} \begin{example} +execution.} +\begin{example} \begin{codeblock} bool f() { diff --git a/source/future.tex b/source/future.tex index 0bdcef3cc7..c8e71d0996 100644 --- a/source/future.tex +++ b/source/future.tex @@ -2009,7 +2009,9 @@ Class template \tcode{wstring_convert} performs conversions between a wide string and a byte string. It lets you specify a code conversion facet (like class template \tcode{codecvt}) to perform the conversions, without -affecting any streams or locales. \begin{example} If you want to use the code +affecting any streams or locales. +\begin{example} +If you want to use the code conversion facet \tcode{codecvt_utf8} to output to \tcode{cout} a UTF-8 multibyte sequence corresponding to a wide string, but you don't want to alter the locale for \tcode{cout}, you can write something like: diff --git a/source/iostreams.tex b/source/iostreams.tex index f0c8b8b616..91352da788 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -11562,7 +11562,8 @@ \pnum Implementations are not required to provide behavior that is not supported by a particular file system. -\begin{example} The FAT file system used by some memory cards, camera memory, and +\begin{example} +The FAT file system used by some memory cards, camera memory, and floppy disks does not support hard links, symlinks, and many other features of more capable file systems, so implementations are not required to support those features on the FAT file system @@ -11962,7 +11963,8 @@ is the operating system dependent mechanism for resolving a pathname to a particular file in a file hierarchy. There may be multiple pathnames that resolve to the same file. -\begin{example} POSIX specifies the mechanism in section 4.11, Pathname resolution. +\begin{example} +POSIX specifies the mechanism in section 4.11, Pathname resolution. \end{example} \begin{codeblock} @@ -12195,7 +12197,9 @@ have special meaning. The following characteristics of filenames are operating system dependent: \begin{itemize} -\item The permitted characters. \begin{example} Some operating systems prohibit +\item The permitted characters. +\begin{example} +Some operating systems prohibit the ASCII control characters (0x00 -- 0x1F) in filenames. \end{example} \begin{note} For wide portability, users may wish to limit \grammarterm{filename} @@ -13059,7 +13063,8 @@ the \grammarterm{directory-separator}. \pnum -\begin{example} On an operating system that uses backslash as +\begin{example} +On an operating system that uses backslash as its \grammarterm{preferred-separator}, \begin{codeblock} path("foo\\bar").generic_string() @@ -13429,7 +13434,8 @@ contains an absolute path\iref{fs.class.path}, otherwise \tcode{false}. \pnum -\begin{example} \tcode{path("/").is_absolute()} is +\begin{example} +\tcode{path("/").is_absolute()} is \tcode{true} for POSIX-based operating systems, and \tcode{false} for Windows-based operating systems. \end{example} \end{itemdescr} @@ -13708,7 +13714,8 @@ \begin{itemize} \item Equality is determined by the \tcode{path} non-member \tcode{operator==}, which considers the two paths' lexical representations only. -\begin{example} \tcode{path("foo") == "bar"} is never \tcode{true}. \end{example} +\begin{example} +\tcode{path("foo") == "bar"} is never \tcode{true}. \end{example} \item Equivalence is determined by the \tcode{equivalent()} non-member function, which determines if two paths resolve\iref{fs.class.path} to the same file system entity. \begin{example} @@ -15527,7 +15534,8 @@ library functions called by the implementation shall have an \tcode{error_code} argument if applicable. \pnum -\begin{example} Given this directory structure: +\begin{example} +Given this directory structure: \begin{codeblock} /dir1 file1 @@ -16886,7 +16894,8 @@ As specified in~\ref{fs.err.report}. \pnum -\begin{example} For POSIX-based operating systems, an implementation might +\begin{example} +For POSIX-based operating systems, an implementation might return the path supplied by the first environment variable found in the list TMPDIR, TMP, TEMP, TEMPDIR, or if none of these are found, \tcode{"/tmp"}. diff --git a/source/lex.tex b/source/lex.tex index 647871d028..2e5a968a43 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -362,7 +362,8 @@ has no associated grammar productions. \pnum -\begin{example} The program fragment \tcode{0xe+foo} is parsed as a +\begin{example} +The program fragment \tcode{0xe+foo} is parsed as a preprocessing number token (one that is not a valid floating or integer literal token), even though a parse as three preprocessing tokens \tcode{0xe}, \tcode{+}, and \tcode{foo} might produce a valid expression (for example, @@ -372,7 +373,8 @@ macro name. \end{example} \pnum -\begin{example} The program fragment \tcode{x+++++y} is parsed as \tcode{x +\begin{example} +The program fragment \tcode{x+++++y} is parsed as \tcode{x ++ ++ + y}, which, if \tcode{x} and \tcode{y} have integral types, violates a constraint on increment operators, even though the parse \tcode{x ++ + ++ y} might yield a correct expression. \end{example}% @@ -990,7 +992,8 @@ digits, which include the decimal digits and the letters \tcode{a} through \tcode{f} and \tcode{A} through \tcode{F} with decimal values ten through fifteen. -\begin{example} The number twelve can be written \tcode{12}, \tcode{014}, +\begin{example} +The number twelve can be written \tcode{12}, \tcode{014}, \tcode{0XC}, or \tcode{0b1100}. The integer literals \tcode{1048576}, \tcode{1'048'576}, \tcode{0X100000}, \tcode{0x10'0000}, and \tcode{0'004'000'000} all have the same value. @@ -1407,7 +1410,8 @@ Optional separating single quotes in a \grammarterm{digit-sequence} or \grammarterm{hexadecimal-digit-sequence} are ignored when determining its value. -\begin{example} The floating literals \tcode{1.602'176'565e-19} and \tcode{1.602176565e-19} +\begin{example} +The floating literals \tcode{1.602'176'565e-19} and \tcode{1.602176565e-19} have the same value. \end{example} Either the integer part or the fraction part (not both) can be omitted. Either the radix point or the letter \tcode{e} or \tcode{E} and @@ -1555,7 +1559,8 @@ \end{note} \pnum -\begin{example} The raw string +\begin{example} +The raw string \begin{codeblock} R"a( @@ -1821,7 +1826,9 @@ \pnum If a token matches both \grammarterm{user-defined-literal} and another \grammarterm{literal} kind, it -is treated as the latter. \begin{example} \tcode{123_km} +is treated as the latter. +\begin{example} +\tcode{123_km} is a \grammarterm{user-defined-literal}, but \tcode{12LL} is an \grammarterm{integer-literal}. \end{example} The syntactic non-terminal preceding the \grammarterm{ud-suffix} in a diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 2fc3c6feaa..d17a1c22c6 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1802,7 +1802,8 @@ \tcode{x} of type \tcode{X}, \tcode{*x} is swappable. -\begin{example} User code can ensure that the evaluation of \tcode{swap} calls +\begin{example} +User code can ensure that the evaluation of \tcode{swap} calls is performed in an appropriate context under the various conditions as follows: \begin{codeblock} #include @@ -2324,7 +2325,8 @@ \tcode{bad_alloc}.\end{note} \pnum -\begin{example} The following is an allocator class template supporting the minimal +\begin{example} +The following is an allocator class template supporting the minimal interface that meets the requirements of \tref{cpp17.allocator}: @@ -2524,7 +2526,8 @@ are reserved for future standardization. The behavior of a \Cpp{} program is undefined if it adds declarations or definitions to such a namespace. -\begin{example} The top level namespace \tcode{std2} is reserved +\begin{example} +The top level namespace \tcode{std2} is reserved for use by future revisions of this International Standard. \end{example} \rSec3[reserved.names]{Reserved names}% @@ -3332,7 +3335,9 @@ \impldef{\tcode{error_category} for errors originating outside the operating system} \tcode{error_category} object for errors originating elsewhere. The implementation shall define the possible values of \tcode{value()} for each of these -error categories. \begin{example} For operating systems that are based on POSIX, +error categories. +\begin{example} +For operating systems that are based on POSIX, implementations should define the \tcode{std::system_category()} values as identical to the POSIX \tcode{errno} values, with additional values as defined by the operating system's documentation. Implementations for operating systems that are not diff --git a/source/numerics.tex b/source/numerics.tex index 0802ea3c32..fe9120ce01 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -7492,7 +7492,8 @@ \pnum \returns An object that holds references to elements of the controlled -sequence selected by \tcode{slicearr}. \begin{example} +sequence selected by \tcode{slicearr}. +\begin{example} \begin{codeblock} valarray v0("abcdefghijklmnop", 16); valarray v1("ABCDE", 5); @@ -7533,7 +7534,8 @@ \pnum \returns An object that holds references to elements of the controlled -sequence selected by \tcode{gslicearr}. \begin{example} +sequence selected by \tcode{gslicearr}. +\begin{example} \begin{codeblock} valarray v0("abcdefghijklmnop", 16); valarray v1("ABCDEF", 6); @@ -7575,7 +7577,8 @@ \pnum \returns An object that holds references to elements of the controlled -sequence selected by \tcode{boolarr}. \begin{example} +sequence selected by \tcode{boolarr}. +\begin{example} \begin{codeblock} valarray v0("abcdefghijklmnop", 16); valarray v1("ABC", 3); @@ -7615,7 +7618,8 @@ \pnum \returns An object that holds references to elements of the controlled -sequence selected by \tcode{indarr}. \begin{example} +sequence selected by \tcode{indarr}. +\begin{example} \begin{codeblock} valarray v0("abcdefghijklmnop", 16); valarray v1("ABCDE", 5); diff --git a/source/overloading.tex b/source/overloading.tex index ec51c9720a..a5f34d9053 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -109,7 +109,8 @@ parameter-type-list\iref{dcl.fct} as well as member function template declarations with the same name, the same parameter-type-list, and the same template parameter lists cannot be overloaded if any of them, but not -all, have a \grammarterm{ref-qualifier}\iref{dcl.fct}. \begin{example} +all, have a \grammarterm{ref-qualifier}\iref{dcl.fct}. +\begin{example} \begin{codeblock} class Y { @@ -2601,7 +2602,8 @@ conversion sequence is the worst conversion necessary to convert an element of the list to \tcode{X}, or if the initializer list has no elements, the identity conversion. This conversion can be a user-defined conversion even in -the context of a call to an initializer-list constructor. \begin{example} +the context of a call to an initializer-list constructor. +\begin{example} \begin{codeblock} void f(std::initializer_list); f( {} ); // OK: \tcode{f(initializer_list)} identity conversion @@ -2694,7 +2696,8 @@ the initializer list according to the rules for aggregate initialization\iref{dcl.init.aggr}, the implicit conversion sequence is a user-defined conversion sequence with the second standard conversion -sequence an identity conversion. \begin{example} +sequence an identity conversion. +\begin{example} \begin{codeblock} struct A { int m1; @@ -2710,7 +2713,8 @@ \pnum Otherwise, if the parameter is a reference, see~\ref{over.ics.ref}. \begin{note} The rules in this subclause will apply for initializing the underlying temporary -for the reference. \end{note} \begin{example} +for the reference. \end{note} +\begin{example} \begin{codeblock} struct A { int m1; @@ -2732,7 +2736,8 @@ \begin{itemize} \item if the initializer list has one element that is not itself an initializer list, the implicit conversion sequence is the one required to convert the element to -the parameter type; \begin{example} +the parameter type; +\begin{example} \begin{codeblock} void f(int); f( {'a'} ); // OK: same conversion as \tcode{char} to \tcode{int} @@ -2741,7 +2746,8 @@ \end{example} \item if the initializer list has no elements, the implicit conversion sequence -is the identity conversion. \begin{example} +is the identity conversion. +\begin{example} \begin{codeblock} void f(int); f( { } ); // OK: identity conversion diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 1e8d2a83a0..e5de3176c4 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -176,7 +176,8 @@ The preprocessing tokens within a preprocessing directive are not subject to macro expansion unless otherwise stated. -\begin{example} In: +\begin{example} +In: \begin{codeblock} #define EMPTY @@ -1191,7 +1192,8 @@ \tcode{\#\#} operators is unspecified. -\begin{example} In the following fragment: +\begin{example} +In the following fragment: \begin{codeblock} #define hash_hash # ## # diff --git a/source/templates.tex b/source/templates.tex index 81952f4bb4..8c31c3ecd7 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -1062,7 +1062,8 @@ \grammarterm{template-argument} that is a class type or a class template, the template definition has no special access rights to the -members of the \grammarterm{template-argument}. \begin{example} +members of the \grammarterm{template-argument}. +\begin{example} \begin{codeblock} template