diff --git a/papers/n4749.html b/papers/n4749.html new file mode 100644 index 0000000000..cfb8a5c4f6 --- /dev/null +++ b/papers/n4749.html @@ -0,0 +1,317 @@ +N4749 +

N4749 Editors' Report -- Programming Languages -- C++

+ +

2018-05-07
+Richard Smith (editor) (Google Inc)
+Dawn Perchik (co-editor) (Embarcadero Technologies Inc)
+Thomas Köppe (co-editor) (Google DeepMind)
+<cxxeditor@gmail.com>

+ +

Acknowledgements

+ +

Special thanks to +Jens Maurer +for performing many of the editorial fixes since N4741.

+ +

Thanks to all those who have submitted editorial +issues +and to those who have provided pull requests with fixes.

+ +

New papers

+ + + +

Motions incorporated into working draft

+ +

This revision contains only editorial changes relative to N4741.

+ +

Minor editorial fixes

+ +

A log of editorial fixes made to the working draft since N4741 is below. +This list excludes changes +that do not affect the body text or only affect whitespace or typeface. For a +complete list including such changes (or for the actual deltas applied by these +changes), consult the draft sources on github.

+ +
commit dc6d80a697df0843b72fca3e2d2555311d8e6b25
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Tue Apr 17 00:03:47 2018 +0200
+
+    [over.oper] Remove incorrect and redundant sentence in a note.
+
+commit aeddcdc6f30b8391bb5c107a1403d6be06bfd1fe
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Apr 21 01:04:19 2018 +0200
+
+    [over.match,over.match.ref] Drop obsolete mention of class prvalues.
+
+commit 067ddaa91a6c57a5ced8e13806b57dc6fa3ce2f4
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Apr 28 00:22:06 2018 +0200
+
+    [over.match.copy,over.match.conv] Clarify candidate function selection for references.
+
+commit ddab7e548944a486bc7fcb34cbccaeead627d778
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Apr 17 00:12:55 2018 +0100
+
+    [numerics] Remove some maths typesetting idiosyncrasies.
+
+    * Remove several instances of manual spacing adjustments,
+      where LaTeX's default spacing works just fine and is more
+      consistent.
+    * Replace \mbox'es with more idiomatic \text.
+    * Improve grammar by adding commas before "where".
+    * Improve source code by removing pointless newline-escapes
+      and minor rearrangements.
+
+commit c35c5e3c4a7092af320b776ec27b634ac6d4b028
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Tue Apr 3 22:51:46 2018 +0200
+
+    [dcl.array] Clarify that an array bound is deduced in an explicit type conversion
+
+commit 703381d5f9cdce46ca3532a66463066950bcd6c1
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Tue Apr 10 23:23:51 2018 +0200
+
+    [dcl.type.cv,expr.ass] Clarify the meaning of "modify" for an object.
+
+commit df1b2ba8c2035a68f1089c385c29edba64f5aec4
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Mon Apr 16 23:53:18 2018 +0200
+
+    [template.gslice.array.overview] Join two single-sentence paragraphs.
+
+commit 01a04366034ccb0c75a1c0713831cdea23e411bb
+Author: languagelawyer <38548419+languagelawyer@users.noreply.github.com>
+Date:   Sat May 5 22:31:16 2018 +0300
+
+    Delete redundant and wrong example
+
+    1. Returning/casting to rvalue reference of *object type* is an xvalue. The example misses the "object type" part.
+    2. A complete and correct list of xvalue expressions is just 2 (or 3? I'm bad at counting) paragraph below. So, fixing the example is not rational, better to delete it.
+
+commit 5706664ea6e38b14d00acec1cca9955b7f734b67
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sun Apr 15 22:51:21 2018 +0200
+
+    [basic.lval] Add array subscripting to note enumerating xvalues.
+
+    Also add cross-references pointing to the normative statements.
+
+commit 8d5a7cef984b6ed02ed4bc6508b4c2ce864593aa
+Author: languagelawyer <38548419+languagelawyer@users.noreply.github.com>
+Date:   Mon May 7 06:15:46 2018 +0300
+
+    [dcl.array]: delete note about non-modifiability of arrays (#2048)
+
+    This note doesn't mean anything and contradicts the fact that a non-const-qualified array lvalue is in fact a modifiable lvalue.
+
+commit 78af2e2abed00a650013fca9819b40e3a134cff2
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Tue Apr 24 07:35:11 2018 +0200
+
+    [dcl.array,expr.sub] Consolidate notes on symmetry of array subscripting.
+
+commit c9d19d1e584c2dec390f4e010c9c83bd581e1078
+Author: Casey Carter <Casey@Carter.net>
+Date:   Thu Apr 26 12:59:00 2018 -0700
+
+    Order library comparisons canonically
+
+    The order [==, !=, <, >, <=, >=] seems to be most common. Let's make it canonical and use it uniformly.
+
+commit 78a00260352f275cfe1323b55db1a3ebeb68e007
+Author: S. B. Tam <cpplearner@outlook.com>
+Date:   Mon Apr 30 13:51:33 2018 +0800
+
+    [basic.scope.pdecl] Change "type-id" to "defining-type-id"
+
+    ... now that _alias-declaration_ uses the _defining-type-id_ nonterminal.
+
+commit 6242d7291cf379a63ec5d4cb65af0d6c2c2273ec
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Mon Apr 30 15:35:42 2018 +0100
+
+    [algorithms.parallel.defns] Fix cross-reference to [algorithms.requirements]
+
+    When [algorithms.general] was split into three subclauses (#1230) the
+    requirements moved to a new subclause, [algorithms.requirements]. That
+    invalidated the cross-reference in [algorithms.parallel.defns].
+
+commit 2062b7f49bd1b87d741a6fb753a7be5b50f3662b
+Author: Gabriel Aubut-Lussier <dalzhim@hotmail.com>
+Date:   Tue May 1 02:17:45 2018 -0400
+
+    [class.dtor] Typo.
+
+commit e22fff1b8d8bffcb3fbf54ffa4730ccad94bd5e1
+Author: Tristan Brindle <t.c.brindle@gmail.com>
+Date:   Fri May 4 19:59:09 2018 +0100
+
+    [span.overview] Fix typo (#2059)
+
+    nnamespace -> namespace
+
+commit 06013de0d00e66204253d2f682b4b879f7686540
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sun Apr 15 22:51:21 2018 +0200
+
+    [pairs.pair] Missed rename from U,V to U1,U2. (#2037)
+
+commit b92f0912c948b9f39e7e1c28580573c734eb21ae
+Author: timsong-cpp <rs2740@gmail.com>
+Date:   Fri Apr 13 18:32:07 2018 -0400
+
+    [time.syn][time.zone] Various editorial fixes (#2028)
+
+commit 1f1b97852aa23f0948511f56b7c0a39d04fe35e5
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Mon Apr 9 00:09:28 2018 +0200
+
+    [template.slice.array] Harmonize presentation with neighboring parallel statements (#2024)
+
+commit 8c50cba4d55450575a8faa24173f08cd16dfb46e
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Apr 6 00:49:18 2018 +0200
+
+    Clarify which kind of parameter pack is intended. (#2020)
+
+commit c9e60abd503039d881f2d56eb0d10ed4cd555566
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Thu Apr 5 21:42:55 2018 +0100
+
+    [template.gslice.array.overview] [template.mask.array.overview] [template.indirect.array.overview] Remove misplaced uses of itemdescr
+
+commit 6d886642cd163af40ae8c5ec4f98f44acfe405f6
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Wed Apr 4 12:50:59 2018 +0200
+
+    [time.syn] Add comments pointing to specification of literal operators (#2018)
+
diff --git a/papers/n4749.md b/papers/n4749.md new file mode 100644 index 0000000000..ebf180c17b --- /dev/null +++ b/papers/n4749.md @@ -0,0 +1,191 @@ +# N4749 Editors' Report -- Programming Languages -- C++ + +2018-05-07 +Richard Smith (editor) (Google Inc) +Dawn Perchik (co-editor) (Embarcadero Technologies Inc) +Thomas Köppe (co-editor) (Google DeepMind) +`` + +## Acknowledgements + +Special thanks to +Jens Maurer +for performing many of the editorial fixes since N4741. + +Thanks to all those who have [submitted editorial +issues](https://github.com/cplusplus/draft/wiki/How-to-submit-an-editorial-issue) +and to those who have provided pull requests with fixes. + +## New papers + + * [N4750](http://wg21.link/n4750) is the current C++ working draft. It replaces [N4741](http://wg21.link/n4741). + * N4749 is this Editors' Report. + +## Motions incorporated into working draft + +This revision contains only editorial changes relative to N4741. + +## Minor editorial fixes + +A log of editorial fixes made to the working draft since N4741 is below. +This list excludes changes +that do not affect the body text or only affect whitespace or typeface. For a +complete list including such changes (or for the actual deltas applied by these +changes), consult the [draft sources on github](https://github.com/cplusplus/draft/compare/n4741...n4750). + + commit dc6d80a697df0843b72fca3e2d2555311d8e6b25 + Author: Jens Maurer + Date: Tue Apr 17 00:03:47 2018 +0200 + + [over.oper] Remove incorrect and redundant sentence in a note. + + commit aeddcdc6f30b8391bb5c107a1403d6be06bfd1fe + Author: Jens Maurer + Date: Sat Apr 21 01:04:19 2018 +0200 + + [over.match,over.match.ref] Drop obsolete mention of class prvalues. + + commit 067ddaa91a6c57a5ced8e13806b57dc6fa3ce2f4 + Author: Jens Maurer + Date: Sat Apr 28 00:22:06 2018 +0200 + + [over.match.copy,over.match.conv] Clarify candidate function selection for references. + + commit ddab7e548944a486bc7fcb34cbccaeead627d778 + Author: Thomas Köppe + Date: Tue Apr 17 00:12:55 2018 +0100 + + [numerics] Remove some maths typesetting idiosyncrasies. + + * Remove several instances of manual spacing adjustments, + where LaTeX's default spacing works just fine and is more + consistent. + * Replace \mbox'es with more idiomatic \text. + * Improve grammar by adding commas before "where". + * Improve source code by removing pointless newline-escapes + and minor rearrangements. + + commit c35c5e3c4a7092af320b776ec27b634ac6d4b028 + Author: Jens Maurer + Date: Tue Apr 3 22:51:46 2018 +0200 + + [dcl.array] Clarify that an array bound is deduced in an explicit type conversion + + commit 703381d5f9cdce46ca3532a66463066950bcd6c1 + Author: Jens Maurer + Date: Tue Apr 10 23:23:51 2018 +0200 + + [dcl.type.cv,expr.ass] Clarify the meaning of "modify" for an object. + + commit df1b2ba8c2035a68f1089c385c29edba64f5aec4 + Author: Jens Maurer + Date: Mon Apr 16 23:53:18 2018 +0200 + + [template.gslice.array.overview] Join two single-sentence paragraphs. + + commit 01a04366034ccb0c75a1c0713831cdea23e411bb + Author: languagelawyer <38548419+languagelawyer@users.noreply.github.com> + Date: Sat May 5 22:31:16 2018 +0300 + + Delete redundant and wrong example + + 1. Returning/casting to rvalue reference of *object type* is an xvalue. The example misses the "object type" part. + 2. A complete and correct list of xvalue expressions is just 2 (or 3? I'm bad at counting) paragraph below. So, fixing the example is not rational, better to delete it. + + commit 5706664ea6e38b14d00acec1cca9955b7f734b67 + Author: Jens Maurer + Date: Sun Apr 15 22:51:21 2018 +0200 + + [basic.lval] Add array subscripting to note enumerating xvalues. + + Also add cross-references pointing to the normative statements. + + commit 8d5a7cef984b6ed02ed4bc6508b4c2ce864593aa + Author: languagelawyer <38548419+languagelawyer@users.noreply.github.com> + Date: Mon May 7 06:15:46 2018 +0300 + + [dcl.array]: delete note about non-modifiability of arrays (#2048) + + This note doesn't mean anything and contradicts the fact that a non-const-qualified array lvalue is in fact a modifiable lvalue. + + commit 78af2e2abed00a650013fca9819b40e3a134cff2 + Author: Jens Maurer + Date: Tue Apr 24 07:35:11 2018 +0200 + + [dcl.array,expr.sub] Consolidate notes on symmetry of array subscripting. + + commit c9d19d1e584c2dec390f4e010c9c83bd581e1078 + Author: Casey Carter + Date: Thu Apr 26 12:59:00 2018 -0700 + + Order library comparisons canonically + + The order [==, !=, <, >, <=, >=] seems to be most common. Let's make it canonical and use it uniformly. + + commit 78a00260352f275cfe1323b55db1a3ebeb68e007 + Author: S. B. Tam + Date: Mon Apr 30 13:51:33 2018 +0800 + + [basic.scope.pdecl] Change "type-id" to "defining-type-id" + + ... now that _alias-declaration_ uses the _defining-type-id_ nonterminal. + + commit 6242d7291cf379a63ec5d4cb65af0d6c2c2273ec + Author: Jonathan Wakely + Date: Mon Apr 30 15:35:42 2018 +0100 + + [algorithms.parallel.defns] Fix cross-reference to [algorithms.requirements] + + When [algorithms.general] was split into three subclauses (#1230) the + requirements moved to a new subclause, [algorithms.requirements]. That + invalidated the cross-reference in [algorithms.parallel.defns]. + + commit 2062b7f49bd1b87d741a6fb753a7be5b50f3662b + Author: Gabriel Aubut-Lussier + Date: Tue May 1 02:17:45 2018 -0400 + + [class.dtor] Typo. + + commit e22fff1b8d8bffcb3fbf54ffa4730ccad94bd5e1 + Author: Tristan Brindle + Date: Fri May 4 19:59:09 2018 +0100 + + [span.overview] Fix typo (#2059) + + nnamespace -> namespace + + commit 06013de0d00e66204253d2f682b4b879f7686540 + Author: Jens Maurer + Date: Sun Apr 15 22:51:21 2018 +0200 + + [pairs.pair] Missed rename from U,V to U1,U2. (#2037) + + commit b92f0912c948b9f39e7e1c28580573c734eb21ae + Author: timsong-cpp + Date: Fri Apr 13 18:32:07 2018 -0400 + + [time.syn][time.zone] Various editorial fixes (#2028) + + commit 1f1b97852aa23f0948511f56b7c0a39d04fe35e5 + Author: Jens Maurer + Date: Mon Apr 9 00:09:28 2018 +0200 + + [template.slice.array] Harmonize presentation with neighboring parallel statements (#2024) + + commit 8c50cba4d55450575a8faa24173f08cd16dfb46e + Author: Jens Maurer + Date: Fri Apr 6 00:49:18 2018 +0200 + + Clarify which kind of parameter pack is intended. (#2020) + + commit c9e60abd503039d881f2d56eb0d10ed4cd555566 + Author: Jonathan Wakely + Date: Thu Apr 5 21:42:55 2018 +0100 + + [template.gslice.array.overview] [template.mask.array.overview] [template.indirect.array.overview] Remove misplaced uses of itemdescr + + commit 6d886642cd163af40ae8c5ec4f98f44acfe405f6 + Author: Jens Maurer + Date: Wed Apr 4 12:50:59 2018 +0200 + + [time.syn] Add comments pointing to specification of literal operators (#2018) diff --git a/papers/n4750.pdf b/papers/n4750.pdf new file mode 100644 index 0000000000..f7150e7d9d Binary files /dev/null and b/papers/n4750.pdf differ diff --git a/source/access.tex b/source/access.tex index f8ec21f7f2..ab35bc7109 100644 --- a/source/access.tex +++ b/source/access.tex @@ -194,9 +194,9 @@ \grammarterm{access-specifier} (\ref{class.derived}): -\begin{ncbnftab} +\begin{ncsimplebnf} access-specifier \terminal{:} \opt{member-specification} -\end{ncbnftab} +\end{ncsimplebnf} An \grammarterm{access-specifier} diff --git a/source/algorithms.tex b/source/algorithms.tex index 59e86a2701..a9f0c66d93 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1304,7 +1304,7 @@ \item Operations on those function objects required by the specification. -\begin{note} See~\ref{algorithms.general}.\end{note} +\begin{note} See~\ref{algorithms.requirements}.\end{note} \end{itemize} These functions are herein called \defn{element access functions}. diff --git a/source/basic.tex b/source/basic.tex index 5503cae341..d51914e242 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -734,7 +734,7 @@ \grammarterm{enum-specifier}\iref{dcl.enum} or its first \grammarterm{opaque-enum-declaration}\iref{dcl.enum}, whichever comes first. The point of declaration of an alias or alias template immediately -follows the \grammarterm{type-id} to which the +follows the \grammarterm{defining-type-id} to which the alias refers. \pnum diff --git a/source/classes.tex b/source/classes.tex index ce46e62b35..bb143e6f8f 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -1309,9 +1309,9 @@ \pnum A \grammarterm{member-declarator} of the form -\begin{ncbnftab} +\begin{ncsimplebnf} \opt{identifier} \opt{attribute-specifier-seq} \terminal{:} constant-expression \opt{brace-or-equal-initializer} -\end{ncbnftab} +\end{ncsimplebnf} \indextext{\idxcode{:}!bit-field declaration}% \indextext{declaration!bit-field}% @@ -1670,9 +1670,9 @@ \pnum A union of the form -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{union} \terminal{\{} member-specification \terminal{\}} \terminal{;} -\end{ncbnftab} +\end{ncsimplebnf} is called an \defn{anonymous union}; it defines an unnamed type and an unnamed object of that type called an \defn{anonymous union object}. diff --git a/source/compatibility.tex b/source/compatibility.tex index 008e6ad6f3..1686a25c86 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -281,8 +281,8 @@ \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, functions may -return lvalues. +more emphasis on lvalues. For example, function calls may +yield lvalues. \effect Change to semantics of well-defined feature. Some C expressions that implicitly rely on lvalue-to-rvalue diff --git a/source/config.tex b/source/config.tex index 9140f76a1b..cf1a7b3242 100644 --- a/source/config.tex +++ b/source/config.tex @@ -1,8 +1,8 @@ %!TEX root = std.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4741} -\newcommand{\prevdocno}{N4727} +\newcommand{\docno}{N4750} +\newcommand{\prevdocno}{N4741} \newcommand{\cppver}{201703L} %% Release date diff --git a/source/containers.tex b/source/containers.tex index f4584bdef5..6fc9d17954 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -2978,16 +2978,16 @@ template bool operator==(const deque& x, const deque& y); - template - bool operator< (const deque& x, const deque& y); template bool operator!=(const deque& x, const deque& y); template - bool operator> (const deque& x, const deque& y); + bool operator< (const deque& x, const deque& y); template - bool operator>=(const deque& x, const deque& y); + bool operator> (const deque& x, const deque& y); template bool operator<=(const deque& x, const deque& y); + template + bool operator>=(const deque& x, const deque& y); template void swap(deque& x, deque& y) @@ -3013,16 +3013,16 @@ template bool operator==(const forward_list& x, const forward_list& y); - template - bool operator< (const forward_list& x, const forward_list& y); template bool operator!=(const forward_list& x, const forward_list& y); template - bool operator> (const forward_list& x, const forward_list& y); + bool operator< (const forward_list& x, const forward_list& y); template - bool operator>=(const forward_list& x, const forward_list& y); + bool operator> (const forward_list& x, const forward_list& y); template bool operator<=(const forward_list& x, const forward_list& y); + template + bool operator>=(const forward_list& x, const forward_list& y); template void swap(forward_list& x, forward_list& y) @@ -3048,16 +3048,16 @@ template bool operator==(const list& x, const list& y); - template - bool operator< (const list& x, const list& y); template bool operator!=(const list& x, const list& y); template - bool operator> (const list& x, const list& y); + bool operator< (const list& x, const list& y); template - bool operator>=(const list& x, const list& y); + bool operator> (const list& x, const list& y); template bool operator<=(const list& x, const list& y); + template + bool operator>=(const list& x, const list& y); template void swap(list& x, list& y) @@ -3083,16 +3083,16 @@ template bool operator==(const vector& x, const vector& y); - template - bool operator< (const vector& x, const vector& y); template bool operator!=(const vector& x, const vector& y); template - bool operator> (const vector& x, const vector& y); + bool operator< (const vector& x, const vector& y); template - bool operator>=(const vector& x, const vector& y); + bool operator> (const vector& x, const vector& y); template bool operator<=(const vector& x, const vector& y); + template + bool operator>=(const vector& x, const vector& y); template void swap(vector& x, vector& y) @@ -5769,19 +5769,19 @@ bool operator==(const map& x, const map& y); template - bool operator< (const map& x, + bool operator!=(const map& x, const map& y); template - bool operator!=(const map& x, + bool operator< (const map& x, const map& y); template bool operator> (const map& x, const map& y); template - bool operator>=(const map& x, + bool operator<=(const map& x, const map& y); template - bool operator<=(const map& x, + bool operator>=(const map& x, const map& y); template @@ -5798,19 +5798,19 @@ bool operator==(const multimap& x, const multimap& y); template - bool operator< (const multimap& x, + bool operator!=(const multimap& x, const multimap& y); template - bool operator!=(const multimap& x, + bool operator< (const multimap& x, const multimap& y); template bool operator> (const multimap& x, const multimap& y); template - bool operator>=(const multimap& x, + bool operator<=(const multimap& x, const multimap& y); template - bool operator<=(const multimap& x, + bool operator>=(const multimap& x, const multimap& y); template @@ -5846,19 +5846,19 @@ bool operator==(const set& x, const set& y); template - bool operator< (const set& x, + bool operator!=(const set& x, const set& y); template - bool operator!=(const set& x, + bool operator< (const set& x, const set& y); template bool operator> (const set& x, const set& y); template - bool operator>=(const set& x, + bool operator<=(const set& x, const set& y); template - bool operator<=(const set& x, + bool operator>=(const set& x, const set& y); template @@ -5874,19 +5874,19 @@ bool operator==(const multiset& x, const multiset& y); template - bool operator< (const multiset& x, + bool operator!=(const multiset& x, const multiset& y); template - bool operator!=(const multiset& x, + bool operator< (const multiset& x, const multiset& y); template bool operator> (const multiset& x, const multiset& y); template - bool operator>=(const multiset& x, + bool operator<=(const multiset& x, const multiset& y); template - bool operator<=(const multiset& x, + bool operator>=(const multiset& x, const multiset& y); template @@ -8851,16 +8851,16 @@ template bool operator==(const queue& x, const queue& y); - template - bool operator< (const queue& x, const queue& y); template bool operator!=(const queue& x, const queue& y); template - bool operator> (const queue& x, const queue& y); + bool operator< (const queue& x, const queue& y); template - bool operator>=(const queue& x, const queue& y); + bool operator> (const queue& x, const queue& y); template bool operator<=(const queue& x, const queue& y); + template + bool operator>=(const queue& x, const queue& y); template void swap(queue& x, queue& y) noexcept(noexcept(x.swap(y))); @@ -8881,16 +8881,16 @@ template bool operator==(const stack& x, const stack& y); - template - bool operator< (const stack& x, const stack& y); template bool operator!=(const stack& x, const stack& y); template - bool operator> (const stack& x, const stack& y); + bool operator< (const stack& x, const stack& y); template - bool operator>=(const stack& x, const stack& y); + bool operator> (const stack& x, const stack& y); template bool operator<=(const stack& x, const stack& y); + template + bool operator>=(const stack& x, const stack& y); template void swap(stack& x, stack& y) noexcept(noexcept(x.swap(y))); @@ -9084,28 +9084,28 @@ \tcode{x.c < y.c}. \end{itemdescr} -\indexlibrary{\idxcode{operator<=}!\idxcode{queue}}% +\indexlibrary{\idxcode{operator>}!\idxcode{queue}}% \begin{itemdecl} template - bool operator<=(const queue& x, const queue& y); + bool operator> (const queue& x, const queue& y); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{x.c <= y.c}. +\tcode{x.c > y.c}. \end{itemdescr} -\indexlibrary{\idxcode{operator>}!\idxcode{queue}}% +\indexlibrary{\idxcode{operator<=}!\idxcode{queue}}% \begin{itemdecl} template - bool operator> (const queue& x, const queue& y); + bool operator<=(const queue& x, const queue& y); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{x.c > y.c}. +\tcode{x.c <= y.c}. \end{itemdescr} \indexlibrary{\idxcode{operator>=}!\idxcode{queue}}% @@ -9631,28 +9631,28 @@ \tcode{x.c < y.c}. \end{itemdescr} -\indexlibrary{\idxcode{operator<=}!\idxcode{stack}}% +\indexlibrary{\idxcode{operator>}!\idxcode{stack}}% \begin{itemdecl} template - bool operator<=(const stack& x, const stack& y); + bool operator> (const stack& x, const stack& y); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{x.c <= y.c}. +\tcode{x.c > y.c}. \end{itemdescr} -\indexlibrary{\idxcode{operator>}!\idxcode{stack}}% +\indexlibrary{\idxcode{operator<=}!\idxcode{stack}}% \begin{itemdecl} template - bool operator> (const stack& x, const stack& y); + bool operator<=(const stack& x, const stack& y); \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{x.c > y.c}. +\tcode{x.c <= y.c}. \end{itemdescr} \indexlibrary{\idxcode{operator>=}!\idxcode{stack}}% @@ -9713,10 +9713,10 @@ constexpr bool operator!=(span l, span r); template constexpr bool operator<(span l, span r); - template - constexpr bool operator<=(span l, span r); template constexpr bool operator>(span l, span r); + template + constexpr bool operator<=(span l, span r); template constexpr bool operator>=(span l, span r); @@ -9759,7 +9759,7 @@ \indexlibrary{\idxcode{span}}% \begin{codeblock} -nnamespace std { +namespace std { template class span { public: @@ -10316,26 +10316,26 @@ \end{codeblock} \end{itemdescr} -\indexlibrary{\idxcode{operator<=}!\idxcode{span}}% +\indexlibrary{\idxcode{operator>}!\idxcode{span}}% \begin{itemdecl} template - constexpr bool operator<=(span l, span r); + constexpr bool operator>(span l, span r); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return !(r < l);} +Equivalent to: \tcode{return (r < l);} \end{itemdescr} -\indexlibrary{\idxcode{operator>}!\idxcode{span}}% +\indexlibrary{\idxcode{operator<=}!\idxcode{span}}% \begin{itemdecl} template - constexpr bool operator>(span l, span r); + constexpr bool operator<=(span l, span r); \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return (r < l);} +Equivalent to: \tcode{return !(r < l);} \end{itemdescr} \indexlibrary{\idxcode{operator>=}!\idxcode{span}}% diff --git a/source/declarations.tex b/source/declarations.tex index 933427f297..79355c3324 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1160,7 +1160,9 @@ \pnum \indextext{const object!undefined change to}% Except that any class member declared \tcode{mutable}\iref{dcl.stc} -can be modified, any attempt to modify a const object during its +can be modified, any attempt to modify~(\ref{expr.ass}, +\ref{expr.post.incr}, \ref{expr.pre.incr}) a +const object\iref{basic.type.qualifier} during its lifetime\iref{basic.life} results in undefined behavior. \begin{example} \begin{codeblock} diff --git a/source/declarators.tex b/source/declarators.tex index 895ee4bd93..4bd8d4cb4d 100644 --- a/source/declarators.tex +++ b/source/declarators.tex @@ -75,12 +75,12 @@ \grammarterm{decl-specifier}{s} are used in a subsequent declaration, they do not have the same meaning, as in \begin{codeblock} -struct S { ... }; +struct S { @\commentellip@ }; S S, T; // declare two instances of \tcode{struct S} \end{codeblock} which is not equivalent to \begin{codeblock} -struct S { ... }; +struct S { @\commentellip@ }; S S; S T; // error \end{codeblock} @@ -149,7 +149,7 @@ \begin{bnf} \nontermdef{parameters-and-qualifiers}\br \terminal{(} parameter-declaration-clause \terminal{)} \opt{cv-qualifier-seq}\br -\hspace*{\bnfindentinc}\opt{ref-qualifier} \opt{noexcept-specifier} \opt{attribute-specifier-seq} + \bnfindent\opt{ref-qualifier} \opt{noexcept-specifier} \opt{attribute-specifier-seq} \end{bnf} \begin{bnf} @@ -1065,10 +1065,11 @@ parameter\iref{dcl.fct}. An array bound may also be omitted when the declarator is followed by an -\grammarterm{initializer}\iref{dcl.init} or +\grammarterm{initializer}\iref{dcl.init}, when a declarator for a static data member is followed by a -\grammarterm{brace-or-equal-initializer}\iref{class.mem}. -In both cases the bound is calculated from the number +\grammarterm{brace-or-equal-initializer}\iref{class.mem}, +or in an explicit type conversion\iref{expr.type.conv}. +In these cases, the bound is calculated from the number \indextext{array size!default}% of initial elements (say, \tcode{N}) @@ -1178,36 +1179,12 @@ \pnum \begin{note} Conversions affecting expressions of array type are described in~\ref{conv.array}. -Objects of array types cannot be modified, see~\ref{basic.lval}. \end{note} \pnum \begin{note} -Except where it has been declared for a class\iref{over.sub}, -the subscript operator -\tcode{[]} -is interpreted -in such a way that -\tcode{E1[E2]} -is identical to -\tcode{*((E1)+(E2))}\iref{expr.sub}. -Because of the conversion rules -that apply to -\tcode{+}, -if -\tcode{E1} -is an array and -\tcode{E2} -an integer, -then -\tcode{E1[E2]} -refers to the -\tcode{E2}-th -member of -\tcode{E1}. -Therefore, -despite its asymmetric -appearance, subscripting is a commutative operation. +The subscript operator can be overloaded for a class\iref{over.sub}. +For the operator's built-in meaning, see \ref{expr.sub}. \end{note} \rSec2[dcl.fct]{Functions}% @@ -1223,7 +1200,7 @@ has the form \begin{ncsimplebnf} \terminal{D1 (} parameter-declaration-clause \terminal{)} \opt{cv-qualifier-seq}\br -\hspace*{\bnfindentinc}\opt{ref-qualifier} \opt{noexcept-specifier} \opt{attribute-specifier-seq} +\bnfindent\opt{ref-qualifier} \opt{noexcept-specifier} \opt{attribute-specifier-seq} \end{ncsimplebnf} and the type of the contained \grammarterm{declarator-id} @@ -1260,7 +1237,7 @@ \begin{ncsimplebnf} \terminal{D1 (} parameter-declaration-clause \terminal{)} \opt{cv-qualifier-seq}\br -\hspace*{\bnfindentinc}\opt{ref-qualifier} \opt{noexcept-specifier} \opt{attribute-specifier-seq} trailing-return-type +\bnfindent\opt{ref-qualifier} \opt{noexcept-specifier} \opt{attribute-specifier-seq} trailing-return-type \end{ncsimplebnf} and the type of the contained @@ -2027,7 +2004,7 @@ \tcode{c)} is the \grammarterm{declarator}; -\tcode{\{ /* ...\ */ \}} +\tcode{\{ \commentellip{} \}} is the \grammarterm{function-body}. \end{example} diff --git a/source/diagnostics.tex b/source/diagnostics.tex index ea891f8f70..deceed9aeb 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -887,8 +887,6 @@ error_condition make_error_condition(errc e) noexcept; // \ref{syserr.compare}, comparison functions - bool operator<(const error_code& lhs, const error_code& rhs) noexcept; - bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept; bool operator==(const error_code& lhs, const error_code& rhs) noexcept; bool operator==(const error_code& lhs, const error_condition& rhs) noexcept; bool operator==(const error_condition& lhs, const error_code& rhs) noexcept; @@ -897,6 +895,8 @@ bool operator!=(const error_code& lhs, const error_condition& rhs) noexcept; bool operator!=(const error_condition& lhs, const error_code& rhs) noexcept; bool operator!=(const error_condition& lhs, const error_condition& rhs) noexcept; + bool operator< (const error_code& lhs, const error_code& rhs) noexcept; + bool operator< (const error_condition& lhs, const error_condition& rhs) noexcept; // \ref{syserr.hash}, hash support template struct hash; @@ -957,7 +957,7 @@ bool operator==(const error_category& rhs) const noexcept; bool operator!=(const error_category& rhs) const noexcept; - bool operator<(const error_category& rhs) const noexcept; + bool operator< (const error_category& rhs) const noexcept; }; const error_category& generic_category() noexcept; @@ -1549,34 +1549,6 @@ \rSec2[syserr.compare]{Comparison functions} -\indexlibrarymember{operator<}{error_code}% -\begin{itemdecl} -bool operator<(const error_code& lhs, const error_code& rhs) noexcept; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\returns -\begin{codeblock} -lhs.category() < rhs.category() || -(lhs.category() == rhs.category() && lhs.value() < rhs.value()) -\end{codeblock} -\end{itemdescr} - -\indexlibrarymember{operator<}{error_condition}% -\begin{itemdecl} -bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\returns -\begin{codeblock} -lhs.category() < rhs.category() || -(lhs.category() == rhs.category() && lhs.value() < rhs.value()) -\end{codeblock} -\end{itemdescr} - \indexlibrarymember{operator==}{error_code}% \begin{itemdecl} bool operator==(const error_code& lhs, const error_code& rhs) noexcept; @@ -1645,6 +1617,34 @@ \returns \tcode{!(lhs == rhs)}. \end{itemdescr} +\indexlibrarymember{operator<}{error_code}% +\begin{itemdecl} +bool operator<(const error_code& lhs, const error_code& rhs) noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns +\begin{codeblock} +lhs.category() < rhs.category() || +(lhs.category() == rhs.category() && lhs.value() < rhs.value()) +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{operator<}{error_condition}% +\begin{itemdecl} +bool operator<(const error_condition& lhs, const error_condition& rhs) noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns +\begin{codeblock} +lhs.category() < rhs.category() || +(lhs.category() == rhs.category() && lhs.value() < rhs.value()) +\end{codeblock} +\end{itemdescr} + \rSec2[syserr.hash]{System error hash support} \indexlibrary{\idxcode{hash}!\idxcode{error_code}}% diff --git a/source/expressions.tex b/source/expressions.tex index 307bb52653..cea2b06139 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -95,11 +95,6 @@ or computes the value of the operand of an operator, as specified by the context in which it appears. \item An \defn{xvalue} is a glvalue that denotes an object or bit-field whose resources can be reused (usually because it is near the end of its lifetime). -\begin{example} -Certain kinds of expressions involving rvalue references\iref{dcl.ref} yield xvalues, -such as a call to a function whose return type is an rvalue reference -or a cast to an rvalue reference type. -\end{example} \item An \defn{lvalue} is a glvalue that is not an xvalue. \item An \defn{rvalue} is a prvalue or an xvalue. \end{itemize} @@ -131,16 +126,20 @@ An expression is an xvalue if it is: \begin{itemize} \item the result of calling a function, whether implicitly or explicitly, -whose return type is an rvalue reference to object type, +whose return type is an rvalue reference to object type\iref{expr.call}, -\item a cast to an rvalue reference to object type, +\item a cast to an rvalue reference to object type +(\ref{expr.dynamic.cast}, \ref{expr.static.cast}, \ref{expr.reinterpret.cast}, +\ref{expr.const.cast}, \ref{expr.cast}), + +\item a subscripting operation with an xvalue array operand\iref{expr.sub}, \item a class member access expression designating a non-static data member of non-reference type -in which the object expression is an xvalue, or +in which the object expression is an xvalue\iref{expr.ref}, or \item a \tcode{.*} pointer-to-member expression in which the first operand is -an xvalue and the second operand is a pointer to data member. +an xvalue and the second operand is a pointer to data member\iref{expr.mptr.oper}. \end{itemize} In general, the effect of this rule is that named rvalue references are treated as lvalues and unnamed rvalue references to objects are treated as @@ -825,7 +824,7 @@ lambda-introducer lambda-declarator \opt{requires-clause} compound-statement\br lambda-introducer \terminal{<} template-parameter-list \terminal{>} \opt{requires-clause} compound-statement\br lambda-introducer \terminal{<} template-parameter-list \terminal{>} \opt{requires-clause}\br - \hspace*{\bnfindentinc}lambda-declarator \opt{requires-clause} compound-statement + \bnfindent lambda-declarator \opt{requires-clause} compound-statement \end{bnf} \begin{bnf} @@ -836,7 +835,7 @@ \begin{bnf} \nontermdef{lambda-declarator}\br \terminal{(} parameter-declaration-clause \terminal{)} \opt{decl-specifier-seq}\br - \hspace*{\bnfindentinc}\opt{noexcept-specifier} \opt{attribute-specifier-seq} \opt{trailing-return-type} + \bnfindent\opt{noexcept-specifier} \opt{attribute-specifier-seq} \opt{trailing-return-type} \end{bnf} \pnum @@ -939,7 +938,7 @@ to which is appended one invented type \grammarterm{template-parameter} for each occurrence of \tcode{auto} in the lambda's \grammarterm{parameter-declaration-clause}, in order of appearance. -The invented type \grammarterm{template-parameter} is a parameter pack if +The invented type \grammarterm{template-parameter} is a template parameter pack if the corresponding \grammarterm{parameter-declaration} declares a function parameter pack\iref{dcl.fct}. The return type and function parameters of the function call operator template are derived from the @@ -1092,11 +1091,11 @@ that of the following conversion function: \begin{codeblock} struct Closure { - template auto operator()(T t) const { ... } + template auto operator()(T t) const { @\commentellip@ } template static auto lambda_call_operator_invoker(T a) { // forwards execution to \tcode{operator()(a)} and therefore has // the same return type deduced - ... + @\commentellip@ } template using fptr_t = decltype(lambda_call_operator_invoker(declval())) (*)(T); @@ -2145,14 +2144,19 @@ is true even if the subscript operator is used in the following common idiom: \tcode{\&x[0]}.} The expression \tcode{E1[E2]} is identical (by definition) to -\tcode{*((E1)+(E2))} -\begin{note} -see~\ref{expr.unary} and~\ref{expr.add} for details of \tcode{*} and -\tcode{+} and~\ref{dcl.array} for details of arrays. -\end{note}, except that in the case of an array operand, the result is an lvalue +\tcode{*((E1)+(E2))}, +except that in the case of an array operand, the result is an lvalue if that operand is an lvalue and an xvalue otherwise. The expression \tcode{E1} is sequenced before the expression \tcode{E2}. +\pnum +\begin{note} +Despite its asymmetric appearance, subscripting is a commutative +operation except for sequencing. +See~\ref{expr.unary} and~\ref{expr.add} for details of \tcode{*} and +\tcode{+} and~\ref{dcl.array} for details of array types. +\end{note} + \pnum A \grammarterm{braced-init-list} shall not be used with the built-in subscript operator. @@ -5612,8 +5616,8 @@ \end{bnf} \pnum -In simple assignment (\tcode{=}), the result of the right operand replaces -the value of the object referred to by the left operand. +In simple assignment (\tcode{=}), the object referred to by the left operand +is modified by replacing its value with the result of the right operand. \pnum \indextext{assignment!conversion by}% diff --git a/source/future.tex b/source/future.tex index 5034bc7371..751897ab77 100644 --- a/source/future.tex +++ b/source/future.tex @@ -1211,7 +1211,7 @@ char* str(); private: - strstreambuf sb; // \expos + strstreambuf sb; // \expos }; } \end{codeblock} @@ -2198,7 +2198,7 @@ \begin{itemdescr} \pnum \requires -\tcode{Fn} and all types in the parameter pack \tcode{ArgTypes} shall be complete types, +\tcode{Fn} and all types in the template parameter pack \tcode{ArgTypes} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound. \pnum diff --git a/source/iostreams.tex b/source/iostreams.tex index 2b5561d511..bde3cbbf1f 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -368,8 +368,8 @@ types. One way to do this might be \begin{codeblock} -template class fpos { ... }; // depends on nothing -using _STATE = ... ; // implementation private declaration of \tcode{stateT} +template class fpos { @\commentellip@ }; // depends on nothing +using _STATE = @\commentellip@ ; // implementation private declaration of \tcode{stateT} using streampos = fpos<_STATE>; @@ -12735,81 +12735,81 @@ for two paths, \tcode{p1 == p2} then \tcode{hash_value(p1) == hash_value(p2)}. \end{itemdescr} -\indexlibrarymember{operator<}{path}% +\indexlibrarymember{operator==}{path}% \begin{itemdecl} -bool operator< (const path& lhs, const path& rhs) noexcept; +bool operator==(const path& lhs, const path& rhs) noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{lhs.compare(rhs) < 0}. +\returns \tcode{!(lhs < rhs) \&\& !(rhs < lhs)}. + +\indextext{path equality} +\pnum +\begin{note} Path equality and path equivalence have different semantics. +\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} +\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} +\tcode{equivalent("foo", "bar")} will be \tcode{true} when both paths resolve to the same file. +\end{example} +\end{itemize} +Programmers wishing to determine if two paths are ``the same'' must decide if + ``the same'' means ``the same representation'' or ``resolve to the same actual + file'', and choose the appropriate function accordingly. \end{note} \end{itemdescr} -\indexlibrarymember{operator<=}{path}% +\indexlibrarymember{operator"!=}{path}% \begin{itemdecl} -bool operator<=(const path& lhs, const path& rhs) noexcept; +bool operator!=(const path& lhs, const path& rhs) noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(rhs < lhs)}. +\returns \tcode{!(lhs == rhs)}. \end{itemdescr} -\indexlibrarymember{operator>}{path}% +\indexlibrarymember{operator<}{path}% \begin{itemdecl} -bool operator> (const path& lhs, const path& rhs) noexcept; +bool operator< (const path& lhs, const path& rhs) noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{rhs < lhs}. +\returns \tcode{lhs.compare(rhs) < 0}. \end{itemdescr} -\indexlibrarymember{operator>=}{path}% +\indexlibrarymember{operator<=}{path}% \begin{itemdecl} -bool operator>=(const path& lhs, const path& rhs) noexcept; +bool operator<=(const path& lhs, const path& rhs) noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(lhs < rhs)}. +\returns \tcode{!(rhs < lhs)}. \end{itemdescr} -\indexlibrarymember{operator==}{path}% +\indexlibrarymember{operator>}{path}% \begin{itemdecl} -bool operator==(const path& lhs, const path& rhs) noexcept; +bool operator> (const path& lhs, const path& rhs) noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(lhs < rhs) \&\& !(rhs < lhs)}. - -\indextext{path equality} -\pnum -\begin{note} Path equality and path equivalence have different semantics. -\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} -\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} -\tcode{equivalent("foo", "bar")} will be \tcode{true} when both paths resolve to the same file. -\end{example} -\end{itemize} -Programmers wishing to determine if two paths are ``the same'' must decide if - ``the same'' means ``the same representation'' or ``resolve to the same actual - file'', and choose the appropriate function accordingly. \end{note} +\returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{operator"!=}{path}% +\indexlibrarymember{operator>=}{path}% \begin{itemdecl} -bool operator!=(const path& lhs, const path& rhs) noexcept; +bool operator>=(const path& lhs, const path& rhs) noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(lhs == rhs)}. +\returns \tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrarymember{operator/}{path}% @@ -13391,11 +13391,11 @@ file_status symlink_status() const; file_status symlink_status(error_code& ec) const noexcept; - bool operator< (const directory_entry& rhs) const noexcept; bool operator==(const directory_entry& rhs) const noexcept; bool operator!=(const directory_entry& rhs) const noexcept; - bool operator<=(const directory_entry& rhs) const noexcept; + bool operator< (const directory_entry& rhs) const noexcept; bool operator> (const directory_entry& rhs) const noexcept; + bool operator<=(const directory_entry& rhs) const noexcept; bool operator>=(const directory_entry& rhs) const noexcept; private: @@ -13788,24 +13788,24 @@ \returns \tcode{pathobject < rhs.pathobject}. \end{itemdescr} -\indexlibrarymember{operator<=}{directory_entry}% +\indexlibrarymember{operator>}{directory_entry}% \begin{itemdecl} -bool operator<=(const directory_entry& rhs) const noexcept; +bool operator> (const directory_entry& rhs) const noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{pathobject <= rhs.pathobject}. +\returns \tcode{pathobject > rhs.pathobject}. \end{itemdescr} -\indexlibrarymember{operator>}{directory_entry}% +\indexlibrarymember{operator<=}{directory_entry}% \begin{itemdecl} -bool operator> (const directory_entry& rhs) const noexcept; +bool operator<=(const directory_entry& rhs) const noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{pathobject > rhs.pathobject}. +\returns \tcode{pathobject <= rhs.pathobject}. \end{itemdescr} \indexlibrarymember{operator>=}{directory_entry}% @@ -14939,7 +14939,7 @@ \pnum \begin{note} The current path as returned by many operating systems is a dangerous - global variable. It may be changed unexpectedly by a third-party or system + global variable. It may be changed unexpectedly by third-party or system library functions, or by another thread. \end{note} \end{itemdescr} diff --git a/source/iterators.tex b/source/iterators.tex index 63d0ca3dd6..02d8434837 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -738,11 +738,11 @@ const reverse_iterator& x, const reverse_iterator& y); template - constexpr bool operator<( + constexpr bool operator!=( const reverse_iterator& x, const reverse_iterator& y); template - constexpr bool operator!=( + constexpr bool operator<( const reverse_iterator& x, const reverse_iterator& y); template @@ -750,11 +750,11 @@ const reverse_iterator& x, const reverse_iterator& y); template - constexpr bool operator>=( + constexpr bool operator<=( const reverse_iterator& x, const reverse_iterator& y); template - constexpr bool operator<=( + constexpr bool operator>=( const reverse_iterator& x, const reverse_iterator& y); @@ -794,10 +794,10 @@ constexpr bool operator<( const move_iterator& x, const move_iterator& y); template - constexpr bool operator<=( + constexpr bool operator>( const move_iterator& x, const move_iterator& y); template - constexpr bool operator>( + constexpr bool operator<=( const move_iterator& x, const move_iterator& y); template constexpr bool operator>=( @@ -1224,11 +1224,11 @@ const reverse_iterator& x, const reverse_iterator& y); template - constexpr bool operator<( + constexpr bool operator!=( const reverse_iterator& x, const reverse_iterator& y); template - constexpr bool operator!=( + constexpr bool operator<( const reverse_iterator& x, const reverse_iterator& y); template @@ -1236,11 +1236,11 @@ const reverse_iterator& x, const reverse_iterator& y); template - constexpr bool operator>=( + constexpr bool operator<=( const reverse_iterator& x, const reverse_iterator& y); template - constexpr bool operator<=( + constexpr bool operator>=( const reverse_iterator& x, const reverse_iterator& y); template @@ -1529,10 +1529,10 @@ \tcode{x.current == y.current}. \end{itemdescr} -\indexlibrarymember{operator<}{reverse_iterator}% +\indexlibrarymember{operator"!=}{reverse_iterator}% \begin{itemdecl} template - constexpr bool operator<( + constexpr bool operator!=( const reverse_iterator& x, const reverse_iterator& y); \end{itemdecl} @@ -1540,13 +1540,13 @@ \begin{itemdescr} \pnum \returns -\tcode{x.current > y.current}. +\tcode{x.current != y.current}. \end{itemdescr} -\indexlibrarymember{operator"!=}{reverse_iterator}% +\indexlibrarymember{operator<}{reverse_iterator}% \begin{itemdecl} template - constexpr bool operator!=( + constexpr bool operator<( const reverse_iterator& x, const reverse_iterator& y); \end{itemdecl} @@ -1554,7 +1554,7 @@ \begin{itemdescr} \pnum \returns -\tcode{x.current != y.current}. +\tcode{x.current > y.current}. \end{itemdescr} \indexlibrarymember{operator>}{reverse_iterator}% @@ -1571,10 +1571,10 @@ \tcode{x.current < y.current}. \end{itemdescr} -\indexlibrarymember{operator>=}{reverse_iterator}% +\indexlibrarymember{operator<=}{reverse_iterator}% \begin{itemdecl} template - constexpr bool operator>=( + constexpr bool operator<=( const reverse_iterator& x, const reverse_iterator& y); \end{itemdecl} @@ -1582,13 +1582,13 @@ \begin{itemdescr} \pnum \returns -\tcode{x.current <= y.current}. +\tcode{x.current >= y.current}. \end{itemdescr} -\indexlibrarymember{operator<=}{reverse_iterator}% +\indexlibrarymember{operator>=}{reverse_iterator}% \begin{itemdecl} template - constexpr bool operator<=( + constexpr bool operator>=( const reverse_iterator& x, const reverse_iterator& y); \end{itemdecl} @@ -1596,7 +1596,7 @@ \begin{itemdescr} \pnum \returns -\tcode{x.current >= y.current}. +\tcode{x.current <= y.current}. \end{itemdescr} \rSec3[reverse.iter.nonmember]{Non-member functions} @@ -2116,10 +2116,10 @@ constexpr bool operator<( const move_iterator& x, const move_iterator& y); template - constexpr bool operator<=( + constexpr bool operator>( const move_iterator& x, const move_iterator& y); template - constexpr bool operator>( + constexpr bool operator<=( const move_iterator& x, const move_iterator& y); template constexpr bool operator>=( @@ -2416,26 +2416,26 @@ \returns \tcode{x.base() < y.base()}. \end{itemdescr} -\indexlibrarymember{operator<=}{move_iterator}% +\indexlibrarymember{operator>}{move_iterator}% \begin{itemdecl} template -constexpr bool operator<=(const move_iterator& x, const move_iterator& y); +constexpr bool operator>(const move_iterator& x, const move_iterator& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(y < x)}. +\returns \tcode{y < x}. \end{itemdescr} -\indexlibrarymember{operator>}{move_iterator}% +\indexlibrarymember{operator<=}{move_iterator}% \begin{itemdecl} template -constexpr bool operator>(const move_iterator& x, const move_iterator& y); +constexpr bool operator<=(const move_iterator& x, const move_iterator& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{y < x}. +\returns \tcode{!(y < x)}. \end{itemdescr} \indexlibrarymember{operator>=}{move_iterator}% diff --git a/source/lex.tex b/source/lex.tex index 54ea4d6339..37b4af9268 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -792,18 +792,20 @@ preprocessing tokens which are used in the syntax of the preprocessor or are converted into tokens for operators and punctuators: -\begin{bnfkeywordtab} +\begin{bnf} +%% Ed. note: character protrusion would misalign various operators. +\microtypesetup{protrusion=false}\obeyspaces \nontermdef{preprocessing-op-or-punc} \textnormal{one of}\br -\>\{ \>\} \>[ \>] \>\# \>\#\# \>( \>)\br -\><: \>:> \><\% \>\%> \>\%: \>\%:\%: \>; \>: \>.{..}\br -\>new \>delete \>? \>:: \>. \>.* \>-> \>->* \>\~\br -\>! \>+ \>- \>* \>/ \>\% \>\caret \>\& \>|\br -\>= \>+= \>-= \>*= \>/= \>\%= \>\caret= \>\&= \>|=\br -\>== \>!= \>< \>> \><= \>>= \><=> \>\&\& \>||\br -\><< \>>> \><<= \>>>= \>++ \>-{-} \>,\br -\>and \>or \>xor \>not \>bitand \>bitor \>compl\br -\>and_eq \>or_eq \>xor_eq \>not_eq -\end{bnfkeywordtab} + \terminal{\{ \} [ ] \# \#\# ( )}\br + \terminal{<: :> <\% \%> \%: \%:\%: ; : ...}\br + \terminal{new delete ? :: . .* -> ->* \~}\br + \terminal{! + - * / \% \caret{} \& |}\br + \terminal{= += -= *= /= \%= \caret{}= \&= |=}\br + \terminal{== != < > <= >= <=> \&\& ||}\br + \terminal{<< >> <<= >>= ++ -- ,}\br + \terminal{and or xor not bitand bitor compl}\br + \terminal{and_eq or_eq xor_eq not_eq} +\end{bnf} Each \grammarterm{preprocessing-op-or-punc} is converted to a single token in translation phase 7\iref{lex.phases}.% @@ -1064,13 +1066,12 @@ c-char-sequence c-char \end{bnf} -\begin{bnftab} +\begin{bnf} \nontermdef{c-char}\br -\>\textnormal{any member of the source character set except}\br -\>\>\textnormal{the single-quote \terminal{'}, backslash \terminal{\textbackslash}, or new-line character}\br -\>escape-sequence\br -\>universal-character-name -\end{bnftab} + \textnormal{any member of the source character set except the single-quote \terminal{'}, backslash \terminal{\textbackslash}, or new-line character}\br + escape-sequence\br + universal-character-name +\end{bnf} \begin{bnf} \nontermdef{escape-sequence}\br @@ -1407,13 +1408,12 @@ s-char-sequence s-char \end{bnf} -\begin{bnftab} +\begin{bnf} \nontermdef{s-char}\br -\>\textnormal{any member of the source character set except}\br -\>\>\textnormal{the double-quote \terminal{"}, backslash \terminal{\textbackslash}, or new-line character}\br -\>escape-sequence\br -\>universal-character-name -\end{bnftab} + \textnormal{any member of the source character set except the double-quote \terminal{"}, backslash \terminal{\textbackslash}, or new-line character}\br + escape-sequence\br + universal-character-name +\end{bnf} \begin{bnf} \nontermdef{raw-string}\br @@ -1426,12 +1426,11 @@ r-char-sequence r-char \end{bnf} -\begin{bnftab} +\begin{bnf} \nontermdef{r-char}\br -\>\textnormal{any member of the source character set, except}\br -\>\>\textnormal{a right parenthesis \terminal{)} followed by the initial \grammarterm{d-char-sequence}}\br -\>\>\textnormal{(which may be empty) followed by a double quote \terminal{"}.} -\end{bnftab} + \textnormal{any member of the source character set, except a right parenthesis \terminal{)} followed by}\br + \bnfindent\textnormal{the initial \grammarterm{d-char-sequence} (which may be empty) followed by a double quote \terminal{"}.} +\end{bnf} \begin{bnf} \nontermdef{d-char-sequence}\br @@ -1439,13 +1438,12 @@ d-char-sequence d-char \end{bnf} -\begin{bnftab} +\begin{bnf} \nontermdef{d-char}\br -\>\textnormal{any member of the basic source character set except:}\br -\>\>\textnormal{space, the left parenthesis \terminal{(}, the right parenthesis \terminal{)}, the backslash \terminal{\textbackslash},}\br -\>\>\textnormal{and the control characters representing horizontal tab,}\br -\>\>\textnormal{vertical tab, form feed, and newline.} -\end{bnftab} + \textnormal{any member of the basic source character set except:}\br + \bnfindent\textnormal{space, the left parenthesis \terminal{(}, the right parenthesis \terminal{)}, the backslash \terminal{\textbackslash}, and the control characters}\br + \bnfindent\textnormal{representing horizontal tab, vertical tab, form feed, and newline.} +\end{bnf} \pnum \indextext{literal!string}% diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 432c061fd5..e32456d7a8 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -606,13 +606,13 @@ The enumerated type \tcode{\placeholder{enumerated}} can be written: \begin{codeblock} -enum @\placeholder{enumerated}@ { @$\tcode{\placeholder{V}}_{0}$@, @$\tcode{\placeholder{V}}_{1}$@, @$\tcode{\placeholder{V}}_{2}$@, @$\tcode{\placeholder{V}}_{3}$@, ..... }; +enum @\placeholder{enumerated}@ { @$\tcode{\placeholder{V}}_{0}$@, @$\tcode{\placeholder{V}}_{1}$@, @$\tcode{\placeholder{V}}_{2}$@, @$\tcode{\placeholder{V}}_{3}$@, @$\ldots$@ }; inline const @$\tcode{\placeholder{enumerated C}}_{0}$@(@$\tcode{\placeholder{V}}_{0}$@); inline const @$\tcode{\placeholder{enumerated C}}_{1}$@(@$\tcode{\placeholder{V}}_{1}$@); inline const @$\tcode{\placeholder{enumerated C}}_{2}$@(@$\tcode{\placeholder{V}}_{2}$@); inline const @$\tcode{\placeholder{enumerated C}}_{3}$@(@$\tcode{\placeholder{V}}_{3}$@); - ..... + @\vdots@ \end{codeblock} \pnum @@ -642,14 +642,14 @@ // For exposition only. // \tcode{int_type} is an integral type capable of representing all values of the bitmask type. enum @\placeholder{bitmask}@ : int_type { - @$\tcode{\placeholder{V}}_{0}$@ = 1 << 0, @$\tcode{\placeholder{V}}_{1}$@ = 1 << 1, @$\tcode{\placeholder{V}}_{2}$@ = 1 << 2, @$\tcode{\placeholder{V}}_{3}$@ = 1 << 3, ..... + @$\tcode{\placeholder{V}}_{0}$@ = 1 << 0, @$\tcode{\placeholder{V}}_{1}$@ = 1 << 1, @$\tcode{\placeholder{V}}_{2}$@ = 1 << 2, @$\tcode{\placeholder{V}}_{3}$@ = 1 << 3, @$\ldots$@ }; inline constexpr @$\tcode{\placeholder{bitmask C}}_{0}$@(@$\tcode{\placeholder{V}}_{0}{}$@); inline constexpr @$\tcode{\placeholder{bitmask C}}_{1}$@(@$\tcode{\placeholder{V}}_{1}{}$@); inline constexpr @$\tcode{\placeholder{bitmask C}}_{2}$@(@$\tcode{\placeholder{V}}_{2}{}$@); inline constexpr @$\tcode{\placeholder{bitmask C}}_{3}$@(@$\tcode{\placeholder{V}}_{3}{}$@); - ..... + @\vdots@ constexpr @\placeholder{bitmask}{}@ operator&(@\placeholder{bitmask}{}@ X, @\placeholder{bitmask}{}@ Y) { return static_cast<@\placeholder{bitmask}{}@>( @@ -845,7 +845,7 @@ \pnum In this library, whenever a declaration is provided for an \tcode{operator!=}, -\tcode{operator>}, \tcode{operator>=}, or \tcode{operator<=} +\tcode{operator>}, \tcode{operator<=}, or \tcode{operator>=} for a type \tcode{T}, its requirements and semantics are as follows, unless explicitly specified otherwise. diff --git a/source/macros.tex b/source/macros.tex index 891c9dcdd4..952301f2ca 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -434,6 +434,7 @@ \newcommand{\nontermdef}[1]{{\BnfNontermshape##1\itcorr}\indexgrammar{\idxgram{##1}}\textnormal{:}} \newcommand{\terminal}[1]{{\BnfTermshape ##1}} \newcommand{\descr}[1]{\textnormal{##1}} + \newcommand{\bnfindent}{\hspace*{\bnfindentfirst}} \newcommand{\bnfindentfirst}{\BnfIndent} \newcommand{\bnfindentinc}{\BnfInc} \newcommand{\bnfindentrest}{\BnfRest} @@ -445,35 +446,6 @@ \nonfrenchspacing } -\newenvironment{BnfTabBase}[2] -{ - \begin{bnfbase} - #1 - \begin{indented} - \begin{tabbing} - \hspace*{\bnfindentfirst}\=\hspace{#2}\=\hspace{.6in}\=\hspace{.6in}\=\hspace{.6in}\=\hspace{.6in}\=\hspace{.6in}\=\hspace{.6in}\=\hspace{.6in}\=\hspace{.6in}\=\hspace{.6in}\=\hspace{.6in}\=\kill} -{ - \end{tabbing} - \end{indented} - \end{bnfbase} -} - -\newenvironment{bnfkeywordtab} -{ - \begin{BnfTabBase}{\BnfTermshape}{.6in} -} -{ - \end{BnfTabBase} -} - -\newenvironment{bnftab} -{ - \begin{BnfTabBase}{\BnfNontermshape}{\bnfindentinc} -} -{ - \end{BnfTabBase} -} - \newenvironment{simplebnf} { \begin{bnfbase} @@ -498,8 +470,6 @@ } % non-copied versions of bnf environments -\let\ncbnftab\bnftab -\let\endncbnftab\endbnftab \let\ncsimplebnf\simplebnf \let\endncsimplebnf\endsimplebnf \let\ncbnf\bnf diff --git a/source/numerics.tex b/source/numerics.tex index bc720f00e7..c1762a98db 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1450,13 +1450,10 @@ \begin{enumeratea} \item - the operator \rightshift{} - denotes a bitwise right shift - with zero-valued bits appearing in the high bits of the result, - and + the operator \rightshift{} denotes a bitwise right shift + with zero-valued bits appearing in the high bits of the result, and \item - the operator $ \leftshift{w} $ - denotes a bitwise left shift + the operator \leftshift{w} denotes a bitwise left shift with zero-valued bits appearing in the low bits of the result, and whose result is always taken modulo $2^w$. \end{enumeratea} @@ -1568,7 +1565,7 @@ that consumes a sequence of integer-valued data and produces a requested number - of unsigned integer values $i$, $ 0 \le i < 2^{32} $, + of unsigned integer values $i$, $0 \le i < 2^{32}$, based on the consumed data. \begin{note} Such an object provides a mechanism @@ -1828,14 +1825,14 @@ given as an integral constant expression; \item the \techterm{transition algorithm} - $ \mathsf{TA} $ + $\mathsf{TA}$ by which \tcode{e}'s state \state{e}{i} is advanced to its \techterm{successor state} \state{e}{i+1}; and \item the \techterm{generation algorithm} - $ \mathsf{GA} $ + $\mathsf{GA}$ by which an engine's state is mapped to a value of type \tcode{result_type}. \end{enumeratea} @@ -1961,9 +1958,9 @@ \indextext{\idxcode{operator()}!random number engine requirement} & \tcode{T} & Advances \tcode{e}'s state \state{e}{i} to - \state{e}{i+1} $ = \mathsf{TA}($\state{e}{i}$)$ + \state{e}{i+1} $= \mathsf{TA}($\state{e}{i}$)$ and returns - $ \mathsf{GA}($\state{e}{i}$)$. + $\mathsf{GA}($\state{e}{i}$)$. & per \tref{UniformRandomBitGenerator} \\ \rowsep \tcode{e.discard(z)}% @@ -1994,7 +1991,7 @@ to \tcode{x()} and \tcode{y()}, respectively, returns \tcode{true} - if $ S_x = S_y $; + if $S_x = S_y$; else returns \tcode{false}. & \bigoh{$\text{size of state}$} \\ \rowsep @@ -2384,7 +2381,7 @@ & \tcode{bool} & This operator is an equivalence relation. Returns \tcode{true} - if \tcode{x.param() == y.param()} and $ S_1 = S_2 $, + if \tcode{x.param() == y.param()} and $S_1 = S_2$, where $S_1$ and $S_2$ are the infinite sequences of values that would be generated, respectively, @@ -2751,7 +2748,7 @@ the generation algorithm% \indextext{\idxcode{linear_congruential_engine}!generation algorithm}% \indextext{generation algorithm!\idxcode{linear_congruential_engine}} -is $ \mathsf{GA}(\state{x}{i}) = \state{x}{i+1} $. +is $\mathsf{GA}(\state{x}{i}) = \state{x}{i+1}$. \indexlibrary{\idxcode{linear_congruential_engine}}% \begin{codeblock} @@ -2813,7 +2810,7 @@ \begin{itemdescr} \pnum\effects Constructs a \tcode{linear_congruential_engine} object. - If $ c \bmod m $ is $0$ and $ \tcode{s} \bmod m $ is $0$, + 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$. \end{itemdescr} @@ -2826,19 +2823,13 @@ \begin{itemdescr} \pnum\effects Constructs a \tcode{linear_congruential_engine} object. With - $ k = \left\lceil \frac{\log_2 m} - {32} - \right\rceil - $ + $k = \left\lceil \frac{\log_2 m}{32} \right\rceil$ and $a$ an array (or equivalent) of length $k + 3$, - invokes \tcode{q.generate($a+0$, $a+k+3$)} + invokes \tcode{q.generate($a + 0$, $a + k + 3$)} and then computes - $ S = \left(\sum_{j=0}^{k-1}a_{j+3} \cdot 2^{32j} \right) \bmod m $. - If - $ c \bmod m $ is $0$ - and - $S$ is $0$, + $S = \left(\sum_{j = 0}^{k - 1} a_{j + 3} \cdot 2^{32j} \right) \bmod m$. + If $c \bmod m$ is $0$ and $S$ is $0$, sets the engine's state to $1$, else sets the engine's state to $S$. @@ -2878,9 +2869,8 @@ and a conditional xor-mask $a$. To improve the uniformity of the result, the bits of the raw shift register are additionally \techterm{tempered} -(i.e., scrambled) -according to a bit-scrambling matrix -defined by values $u, d, s, b, t, c,$ and $\ell$. +(i.e., scrambled) according to a bit-scrambling matrix +defined by values $u$, $d$, $s$, $b$, $t$, $c$, and $\ell$. The state transition is performed as follows: \begin{enumeratea} @@ -2978,9 +2968,7 @@ The textual representation% \indextext{\idxcode{mersenne_twister_engine}!textual representation} of \state{x}{i} -consists of -the values of - $X_{i-n}, \ldots, X_{i-1}$, +consists of the values of $X_{i - n}, \dotsc, X_{i - 1}$, in that order. \indexlibrary{\idxcode{mersenne_twister_engine}!constructor}% @@ -2991,9 +2979,7 @@ \begin{itemdescr} \pnum\effects Constructs a \tcode{mersenne_twister_engine} object. Sets $X_{-n}$ to $\tcode{value} \bmod 2^w$. - Then, iteratively for $i = 1\!-\!n,\ldots,-1$, - sets $X_i$ - to +Then, iteratively for $i = 1 - n, \dotsc, -1$, sets $X_i$ to \[% \bigl[f \cdot \bigl(X_{i-1} \xor \bigl(X_{i-1} \rightshift (w-2)\bigr) @@ -3014,13 +3000,13 @@ \begin{itemdescr} \pnum\effects Constructs a \tcode{mersenne_twister_engine} object. With - $ k = \left\lceil w / 32 \right\rceil $ + $k = \left\lceil w / 32 \right\rceil$ and $a$ an array (or equivalent) - of length $ n \cdot k $, + of length $n \cdot k$, invokes \tcode{q.generate($a+0$, $a+n \cdot k$)} - and then, iteratively for $i = -n,\ldots,-1$, + and then, iteratively for $i = -n,\dotsc,-1$, sets $X_i$ - to $ \left(\sum_{j=0}^{k-1}a_{k(i+n)+j} \cdot 2^{32j} \right) \bmod 2^w $. + to $\left(\sum_{j=0}^{k-1}a_{k(i+n)+j} \cdot 2^{32j} \right) \bmod 2^w$. Finally, if the most significant $w-r$ bits of $X_{-n}$ are zero, @@ -3065,9 +3051,9 @@ is performed as follows: \begin{enumeratea} \item - Let $ Y = X_{i-s} - X_{i-r} - c $. + Let $Y = X_{i-s} - X_{i-r} - c$. \item - Set $X_i$ to $ y = Y \bmod m $. + Set $X_i$ to $y = Y \bmod m$. Set $c$ to 1 if $Y < 0$, otherwise set $c$ to 0. \end{enumeratea} @@ -3075,24 +3061,19 @@ This algorithm corresponds to a modular linear function of the form - $ \mathsf{TA}(\state{x}{i}) = (a \cdot \state{x}{i}) \bmod b $, + $\mathsf{TA}(\state{x}{i}) = (a \cdot \state{x}{i}) \bmod b$, where $b$ is of the form - $ m^r - m^s + 1 $ - and $ a = b - (b-1) / m $. + $m^r - m^s + 1$ + and $a = b - (b - 1) / m$. \end{note} \pnum The generation algorithm% \indextext{\idxcode{subtract_with_carry_engine}!generation algorithm}% \indextext{generation algorithm!\idxcode{subtract_with_carry_engine}} -is given by -$ \mathsf{GA}(\state{x}{i}) = y $, -where - $y$ -is the value produced -as a result -of advancing the engine's state -as described above. +is given by $\mathsf{GA}(\state{x}{i}) = y$, +where $y$ is the value produced as a result +of advancing the engine's state as described above. \indexlibrary{\idxcode{subtract_with_carry_engine}}% \begin{codeblock} @@ -3135,7 +3116,7 @@ \indextext{\idxcode{subtract_with_carry_engine}!textual representation}% \indextext{textual representation!\idxcode{subtract_with_carry_engine}} consists of the values of - $X_{i-r}, \ldots, X_{i-1}$, + $X_{i-r}, \dotsc, X_{i-1}$, in that order, followed by $c$. @@ -3147,7 +3128,7 @@ \begin{itemdescr} \pnum\effects Constructs a \tcode{subtract_with_carry_engine} object. Sets the values of - $ X_{-r}, \ldots, X_{-1} $, + $X_{-r}, \dotsc, X_{-1}$, in that order, as specified below. If $X_{-1}$ is then $0$, sets $c$ to $1$; @@ -3161,10 +3142,10 @@ 40014u,0u,2147483563u> e(value == 0u ? default_seed : value); \end{codeblock} Then, to set each $X_k$, - obtain new values $ z_0, \ldots, z_{n-1} $ - from $n = \lceil w/32 \rceil $ successive invocations + obtain new values $z_0, \dotsc, z_{n-1}$ + from $n = \lceil w/32 \rceil$ successive invocations 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$. + 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 of \tcode{e}. @@ -3180,11 +3161,11 @@ \begin{itemdescr} \pnum\effects Constructs a \tcode{subtract_with_carry_engine} object. With - $ k = \left\lceil w / 32 \right\rceil $ + $k = \left\lceil w / 32 \right\rceil$ and $a$ an array (or equivalent) - of length $ r \cdot k $, - invokes \tcode{q.generate($a+0$, $a+r \cdot k$)} - and then, iteratively for $i = -r, \ldots, -1$, + of length $r \cdot k$, + invokes \tcode{q.generate($a + 0$, $a + r \cdot k$)} + and then, iteratively for $i = -r, \dotsc, -1$, sets $X_i$ to $ \left(\sum_{j=0}^{k-1}a_{k(i+r)+j} \cdot 2^{32j} \right) \bmod m $. If $X_{-1}$ is then $0$, @@ -3385,29 +3366,29 @@ \begin{enumeratea} \item Let - $ R = \tcode{e.max() - e.min() + 1} $ + $R = \tcode{e.max() - e.min() + 1}$ and - $ m = \left\lfloor \log_2 R \right\rfloor $. + $m = \left\lfloor \log_2 R \right\rfloor$. \item With $n$ as determined below, let - $ w_0 = \left\lfloor w / n \right\rfloor $, - $ n_0 = n - w \bmod n $, - $ y_0 = 2^{w_0} \left\lfloor R / 2^{w_0} \right\rfloor $, + $w_0 = \left\lfloor w / n \right\rfloor$, + $n_0 = n - w \bmod n$, + $y_0 = 2^{w_0} \left\lfloor R / 2^{w_0} \right\rfloor$, and - $ y_1 = 2^{w_0 + 1} \left\lfloor R / 2^{w_0 + 1} \right\rfloor $. + $y_1 = 2^{w_0 + 1} \left\lfloor R / 2^{w_0 + 1} \right\rfloor$. \item Let - $ n = \left\lceil w / m \right\rceil $ + $n = \left\lceil w / m \right\rceil$ if and only if the relation - $ R - y_0 \leq \left\lfloor y_0 / n \right\rfloor $ + $R - y_0 \leq \left\lfloor y_0 / n \right\rfloor$ holds as a result. Otherwise let - $ n = 1 + \left\lceil w / m \right\rceil $. + $n = 1 + \left\lceil w / m \right\rceil$. \end{enumeratea} \begin{note} The relation - $ w = n_0 w_0 + (n - n_0)(w_0 + 1) $ + $w = n_0 w_0 + (n - n_0)(w_0 + 1)$ always holds. \end{note} @@ -3415,17 +3396,10 @@ The transition algorithm% \indextext{\idxcode{independent_bits_engine}!transition algorithm}% \indextext{transition algorithm!\idxcode{independent_bits_engine}} -is carried out -by invoking \tcode{e()} -as often as needed -to obtain - $ n_0 $ -values less than -$ y_0 + \tcode{e.min()} $ -and - $ n - n_0 $ -values less than $ y_1 + \tcode{e.min()} $% -. +is carried out by invoking \tcode{e()} +as often as needed to obtain $n_0$ +values less than $y_0 + \tcode{e.min()}$ +and $n - n_0$ values less than $y_1 + \tcode{e.min()}$. \pnum The generation algorithm% @@ -3438,12 +3412,12 @@ \begin{codeblock} @$S$@ = 0; for (@$k$@ = @$0$@; @$k \neq n_0$@; @$k$@ += @$1$@) { - do @$u$@ = e() - e.min(); while (@$ u \ge y_0 $@); - @$S$@ = @$ 2^{w_0} \cdot S + u \bmod 2^{w_0} $@; + do @$u$@ = e() - e.min(); while (@$u \ge y_0$@); + @$S$@ = @$2^{w_0} \cdot S + u \bmod 2^{w_0}$@; } for (@$k$@ = @$n_0$@; @$k \neq n$@; @$k$@ += @$1$@) { - do @$u$@ = e() - e.min(); while (@$ u \ge y_1 $@); - @$S$@ = @$ 2^{w_0 + 1} \cdot S + u \bmod 2^{w_0 + 1} $@; + do @$u$@ = e() - e.min(); while (@$u \ge y_1$@); + @$S$@ = @$2^{w_0 + 1} \cdot S + u \bmod 2^{w_0 + 1}$@; } \end{codeblock} @@ -3519,7 +3493,7 @@ an additional sequence $V$ of $k$ values also of the type delivered by \tcode{e}. The size of the state is - the size of $e$'s state plus $k+1$. + the size of $e$'s state plus $k + 1$. \pnum The transition algorithm% @@ -3604,7 +3578,7 @@ each constructor% \indexlibrary{\idxcode{shuffle_order_engine}!constructor} that is not a copy constructor -initializes $\tcode{V[0]}, \ldots, \tcode{V[k-1]}$ and $Y$, +initializes $\tcode{V[0]}, \dotsc, \tcode{V[k-1]}$ and $Y$, in that order, with values returned by successive invocations of \tcode{e()}.% \indextext{random number generation!engines|)} @@ -3703,7 +3677,7 @@ of a default-constructed object of type \tcode{ran\-lux24_base} shall produce the value - $ 7937952 $. + $7937952$. \end{itemdescr} \indexlibrary{\idxcode{ranlux48_base}}% @@ -3719,7 +3693,7 @@ of a default-constructed object of type \tcode{ran\-lux48_base} shall produce the value - $ 61839128582725 $. + $61839128582725$. \end{itemdescr} \indexlibrary{\idxcode{ranlux24}}% @@ -3734,7 +3708,7 @@ of a default-constructed object of type \tcode{ranlux24} shall produce the value - $ 9901578 $. + $9901578$. \end{itemdescr} \indexlibrary{\idxcode{ranlux48}}% @@ -3749,7 +3723,7 @@ of a default-constructed object of type \tcode{ranlux48} shall produce the value - $ 249142670248501 $. + $249142670248501$. \end{itemdescr} \indexlibrary{\idxcode{knuth_b}}% @@ -3879,9 +3853,9 @@ returns $0.0$. Otherwise, returns an entropy estimate\footnote{If a device has $n$ states whose respective probabilities are - $ P_0, \ldots, P_{n-1} $, + $P_0, \dotsc, P_{n-1}$, the device entropy $S$ is defined as\\ - $ S = - \sum_{i=0}^{n-1} P_i \cdot \log P_i $.} + $S = - \sum_{i=0}^{n-1} P_i \cdot \log P_i$.} for the random numbers returned by \tcode{operator()}, in the range \tcode{min()} @@ -4026,14 +4000,14 @@ \pnum\effects Does nothing if \tcode{begin == end}. Otherwise, - with $ s = \tcode{v.size()} $ - and $ n = \tcode{end} - \tcode{begin} $, + with $s = \tcode{v.size()}$ + and $n = \tcode{end} - \tcode{begin}$, fills the supplied range $[\tcode{begin},\tcode{end})$ according to the following algorithm in which each operation is to be carried out modulo $2^{32}$, each indexing operator applied to \tcode{begin} is to be taken modulo $n$, - and $T(x)$ is defined as $ x \, \xor \, (x \, \rightshift \, 27)$: + and $T(x)$ is defined as $x \, \xor \, (x \, \rightshift \, 27)$: \begin{enumeratea} \item @@ -4050,7 +4024,7 @@ \item With $m$ as the larger of $s + 1$ and $n$, transform the elements of the range: - iteratively for $ k = 0, \ldots, m-1 $, + iteratively for $k = 0, \dotsc, m - 1$, calculate values \begin{eqnarray*} r_1 & = & @@ -4077,7 +4051,7 @@ \item Transform the elements of the range again, beginning where the previous step ended: - iteratively for $ k = m, \ldots, m\!+\!n\!-\!1 $, + iteratively for $k = m, \dotsc, m + n - 1$, calculate values \begin{eqnarray*} r_3 & = & @@ -4159,7 +4133,7 @@ produced by \tcode{g} are uniformly distributed, the instantiation's results - $t_j$, $ 0 \leq t_j < 1 $, + $t_j$, $0 \leq t_j < 1$, are distributed as uniformly as possible as specified below. @@ -4181,7 +4155,7 @@ \begin{itemdescr} \pnum\complexity Exactly - $ k = \max(1, \left\lceil b / \log_2 R \right\rceil)$ + $k = \max(1, \left\lceil b / \log_2 R \right\rceil)$ invocations of \tcode{g}, where $b$\footnote{$b$ is introduced @@ -4191,11 +4165,11 @@ is the lesser of \tcode{numeric_limits::digits} and \tcode{bits}, and - $R$ is the value of $ \tcode{g.max()} - \tcode{g.min()} + 1 $. + $R$ is the value of $\tcode{g.max()} - \tcode{g.min()} + 1$. \pnum\effects Invokes \tcode{g()} $k$ times - to obtain values $ g_0, \ldots, g_{k-1} $, respectively. + to obtain values $g_0, \dotsc, g_{k-1}$, respectively. Calculates a quantity \[ S = \sum_{i=0}^{k-1} (g_i - \tcode{g.min()}) @@ -4204,8 +4178,8 @@ using arithmetic of type \tcode{RealType}. -\pnum\returns - $ S / R^k $. +\pnum +\returns $S / R^k$. \pnum\throws What and when \tcode{g} throws. \end{itemdescr}% @@ -4276,15 +4250,12 @@ \pnum A \tcode{uniform_int_distribution} random number distribution produces random integers $i$, -$ a \leq i \leq b $, +$a \leq i \leq b$, distributed according to the constant discrete probability function% \indextext{discrete probability function!\idxcode{uniform_int_distribution}}% \indextext{\idxcode{uniform_int_distribution}!discrete probability function}% -\[% - P(i\,|\,a,b) = 1 / (b - a + 1) -\; \mbox{.} -\] +\[ P(i\,|\,a,b) = 1 / (b - a + 1) \text{ .} \] \indexlibrary{\idxcode{uniform_int_distribution}}% \begin{codeblock} @@ -4324,7 +4295,7 @@ \begin{itemdescr} \pnum\requires - $ \tcode{a} \leq \tcode{b} $. + $\tcode{a} \leq \tcode{b}$. \pnum\effects Constructs a \tcode{uniform_int_distribution} object; \tcode{a} and \tcode{b} @@ -4361,15 +4332,12 @@ \pnum A \tcode{uniform_real_distribution} random number distribution produces random numbers $x$, -$ a \leq x < b $, +$a \leq x < b$, distributed according to the constant probability density function% \indextext{probability density function!\idxcode{uniform_real_distribution}}% \indextext{\idxcode{uniform_real_distribution}!probability density function}% -\[% - p(x\,|\,a,b) = 1 / (b - a) -\; \mbox{.} -\] +\[ p(x\,|\,a,b) = 1 / (b - a) \text{ .} \] \begin{note} This implies that $p(x\,|\,a,b)$ is undefined when \tcode{a == b}. \end{note} @@ -4412,9 +4380,9 @@ \begin{itemdescr} \pnum\requires - $ \tcode{a} \leq \tcode{b} $ + $\tcode{a} \leq \tcode{b}$ and - $ \tcode{b} - \tcode{a} \leq \tcode{numeric_limits::max()} $. + $\tcode{b} - \tcode{a} \leq \tcode{numeric_limits::max()}$. \pnum\effects Constructs a \tcode{uniform_real_distribution} object; \tcode{a} and \tcode{b} @@ -4468,13 +4436,10 @@ the discrete probability function \indextext{discrete probability function!\idxcode{bernoulli_distribution}}% \indextext{\idxcode{bernoulli_distribution}!discrete probability function}% -\[% - P(b\,|\,p) - = \left\{ \begin{array}{lcl} - p & \mbox{if} & b = \tcode{true} \\ - 1-p & \mbox{if} & b = \tcode{false} - \end{array}\right. -\; \mbox{.} +\[ P(b\,|\,p) = \left\{ \begin{array}{ll} + p & \text{ if $b = \tcode{true}$, or} \\ + 1 - p & \text{ if $b = \tcode{false}$.} + \end{array}\right. \] \indexlibrary{\idxcode{bernoulli_distribution}}% @@ -4544,11 +4509,7 @@ the discrete probability function% \indextext{discrete probability function!\idxcode{binomial_distribution}}% \indextext{\idxcode{binomial_distribution}!discrete probability function}% -\[% - P(i\,|\,t,p) - = \binom{t}{i} \cdot p^i \cdot (1-p)^{t-i} -\; \mbox{.} -\] +\[ P(i\,|\,t,p) = \binom{t}{i} \cdot p^i \cdot (1-p)^{t-i} \text{ .} \] \indexlibrary{\idxcode{binomial_distribution}}% \begin{codeblock} @@ -4628,11 +4589,7 @@ the discrete probability function \indextext{discrete probability function!\idxcode{geometric_distribution}}% \indextext{\idxcode{geometric_distribution}!discrete probability function}% -\[% - P(i\,|\,p) - = p \cdot (1-p)^{i} -\; \mbox{.} -\] +\[ P(i\,|\,p) = p \cdot (1-p)^{i} \text{ .} \] \indexlibrary{\idxcode{geometric_distribution}}% \begin{codeblock} @@ -4703,11 +4660,7 @@ the discrete probability function \indextext{discrete probability function!\idxcode{negative_binomial_distribution}}% \indextext{\idxcode{negative_binomial_distribution}!discrete probability function}% -\[% - P(i\,|\,k,p) - = \binom{k+i-1}{i} \cdot p^k \cdot (1-p)^i -\; \mbox{.} -\] +\[ P(i\,|\,k,p) = \binom{k+i-1}{i} \cdot p^k \cdot (1-p)^i \text{ .} \] \begin{note} This implies that $P(i\,|\,k,p)$ is undefined when \tcode{p == 1}. \end{note} @@ -4800,17 +4753,12 @@ \pnum A \tcode{poisson_distribution} random number distribution -produces integer values $ i \geq 0 $ +produces integer values $i \geq 0$ distributed according to the discrete probability function \indextext{discrete probability function!\idxcode{poisson_distribution}}% \indextext{\idxcode{poisson_distribution}!discrete probability function}% -\[% - P(i\,|\,\mu) - = \frac{ e^{-\mu} \mu^{i} } - { i\,! } -\; \mbox{.} -\] +\[ P(i\,|\,\mu) = \frac{e^{-\mu} \mu^{i}}{i\,!} \text{ .} \] The distribution parameter $\mu$ is also known as this distribution's \techterm{mean}% \indextext{mean!\idxcode{poisson_distribution}}% @@ -4853,12 +4801,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{mean} $. +\pnum +\requires $0 < \tcode{mean}$. -\pnum\effects Constructs a \tcode{poisson_distribution} object; - \tcode{mean} - corresponds to the parameter of the distribution. +\pnum +\effects Constructs a \tcode{poisson_distribution} object; +\tcode{mean} corresponds to the parameter of the distribution. \end{itemdescr} \indexlibrarymember{mean}{poisson_distribution}% @@ -4885,11 +4833,7 @@ the probability density function% \indextext{probability density function!\idxcode{exponential_distribution}}% \indextext{\idxcode{exponential_distribution}!probability density function}% -\[% - p(x\,|\,\lambda) - = \lambda e^{-\lambda x} -\; \mbox{.} -\] +\[ p(x\,|\,\lambda) = \lambda e^{-\lambda x} \text{ .} \] \indexlibrary{\idxcode{exponential_distribution}}% \begin{codeblock} @@ -4927,12 +4871,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{lambda} $. +\pnum +\requires $0 < \tcode{lambda}$. -\pnum\effects Constructs an \tcode{exponential_distribution} object; - \tcode{lambda} - corresponds to the parameter of the distribution. +\pnum +\effects Constructs an \tcode{exponential_distribution} object; +\tcode{lambda} corresponds to the parameter of the distribution. \end{itemdescr} \indexlibrarymember{lambda}{exponential_distribution}% @@ -4959,12 +4903,9 @@ the probability density function% \indextext{probability density function!\idxcode{gamma_distribution}}% \indextext{\idxcode{gamma_distribution}!probability density function}% -\[% - p(x\,|\,\alpha,\beta) - = \frac{e^{-x/\beta}}{\beta^{\alpha} \cdot \Gamma(\alpha)} - \, \cdot \, x^{\, \alpha-1} -\; \mbox{.} -\] +\[ p(x\,|\,\alpha,\beta) = + \frac{e^{-x/\beta}}{\beta^{\alpha} \cdot \Gamma(\alpha)} \, \cdot \, x^{\, \alpha-1} + \text{ .} \] \indexlibrary{\idxcode{gamma_distribution}}% \begin{codeblock} @@ -5003,13 +4944,13 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{alpha} $ - and $ 0 < \tcode{beta} $. +\pnum +\requires $0 < \tcode{alpha}$ and $0 < \tcode{beta}$. -\pnum\effects Constructs a \tcode{gamma_distribution} object; - \tcode{alpha} and \tcode{beta} - correspond to the parameters of the distribution. +\pnum +\effects Constructs a \tcode{gamma_distribution} object; +\tcode{alpha} and \tcode{beta} +correspond to the parameters of the distribution. \end{itemdescr} \indexlibrarymember{alpha}{gamma_distribution}% @@ -5047,13 +4988,10 @@ the probability density function% \indextext{probability density function!\idxcode{weibull_distribution}}% \indextext{\idxcode{weibull_distribution}!probability density function}% -\[% - p(x\,|\,a,b) - = \frac{a}{b} - \cdot \left(\frac{x}{b}\right)^{a-1} - \cdot \, \exp\left( -\left(\frac{x}{b}\right)^a\right) -\; \mbox{.} -\] +\[ p(x\,|\,a,b) = \frac{a}{b} + \cdot \left(\frac{x}{b}\right)^{a-1} + \cdot \, \exp\left( -\left(\frac{x}{b}\right)^a\right) + \text{ .} \] \indexlibrary{\idxcode{weibull_distribution}}% \begin{codeblock} @@ -5091,12 +5029,13 @@ \end{itemdecl}% \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{a} $ and $ 0 < \tcode{b} $. +\pnum +\requires $0 < \tcode{a}$ and $0 < \tcode{b}$. -\pnum\effects Constructs a \tcode{weibull_distribution} object; - \tcode{a} and \tcode{b} - correspond to the respective parameters of the distribution. +\pnum +\effects Constructs a \tcode{weibull_distribution} object; +\tcode{a} and \tcode{b} +correspond to the respective parameters of the distribution. \end{itemdescr} \indexlibrarymember{a}{weibull_distribution}% @@ -5141,14 +5080,9 @@ distribution.}% \indextext{probability density function!\idxcode{extreme_value_distribution}}% \indextext{\idxcode{extreme_value_distribution}!probability density function} -\[% - p(x\,|\,a,b) - = \frac{1}{b} - \cdot \exp\left( \frac{a-x}{b} - \,-\, \exp\left(\frac{a-x}{b}\right) - \right) -\; \mbox{.} -\] +\[ p(x\,|\,a,b) = \frac{1}{b} + \cdot \exp\left(\frac{a-x}{b} - \exp\left(\frac{a-x}{b}\right)\right) + \text{ .} \] \indexlibrary{\idxcode{extreme_value_distribution}}% \begin{codeblock} @@ -5187,12 +5121,13 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{b} $. +\pnum +\requires $0 < \tcode{b}$. -\pnum\effects Constructs an \tcode{extreme_value_distribution} object; - \tcode{a} and \tcode{b} - correspond to the respective parameters of the distribution. +\pnum +\effects Constructs an \tcode{extreme_value_distribution} object; +\tcode{a} and \tcode{b} +correspond to the respective parameters of the distribution. \end{itemdescr} \indexlibrarymember{a}{extreme_value_distribution}% @@ -5251,7 +5186,7 @@ {2 \sigma^2} \right) } -\; \mbox{.} + \text{ .} \] The distribution parameters $\mu$ and $\sigma$ are also known as this distribution's \techterm{mean}% @@ -5299,12 +5234,13 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{stddev} $. +\pnum +\requires $0 < \tcode{stddev}$. -\pnum\effects Constructs a \tcode{normal_distribution} object; - \tcode{mean} and \tcode{stddev} - correspond to the respective parameters of the distribution. +\pnum +\effects Constructs a \tcode{normal_distribution} object; +\tcode{mean} and \tcode{stddev} +correspond to the respective parameters of the distribution. \end{itemdescr} \indexlibrarymember{mean}{normal_distribution}% @@ -5337,22 +5273,14 @@ \pnum A \tcode{lognormal_distribution} random number distribution -produces random numbers $ x > 0 $ +produces random numbers $x > 0$ distributed according to the probability density function% \indextext{probability density function!\idxcode{lognormal_distribution}}% \indextext{\idxcode{lognormal_distribution}!probability density function}% -\[% - p(x\,|\,m,s) - = \frac{1} - {s x \sqrt{2 \pi}} - \cdot - \exp{\left(- \, \frac{(\ln{x} - m)^2} - {2 s^2} - \right) - } -\; \mbox{.} -\] +\[ p(x\,|\,m,s) = \frac{1}{s x \sqrt{2 \pi}} + \cdot \exp{\left(-\frac{(\ln{x} - m)^2}{2 s^2}\right)} + \text{ .} \] \indexlibrary{\idxcode{lognormal_distribution}}% \begin{codeblock} @@ -5391,12 +5319,13 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{s} $. +\pnum +\requires $0 < \tcode{s}$. -\pnum\effects Constructs a \tcode{lognormal_distribution} object; - \tcode{m} and \tcode{s} - correspond to the respective parameters of the distribution. +\pnum +\effects Constructs a \tcode{lognormal_distribution} object; +\tcode{m} and \tcode{s} +correspond to the respective parameters of the distribution. \end{itemdescr} \indexlibrarymember{m}{lognormal_distribution}% @@ -5429,17 +5358,12 @@ \pnum A \tcode{chi_squared_distribution} random number distribution -produces random numbers $x>0$ +produces random numbers $x > 0$ distributed according to the probability density function% \indextext{probability density function!\idxcode{chi_squared_distribution}}% \indextext{\idxcode{chi_squared_distribution}!probability density function}% -\[% - p(x\,|\,n) - = \frac{ x^{(n/2)-1} \cdot e^{-x/2}} - {\Gamma(n/2) \cdot 2^{n/2}} -\; \mbox{.} -\] +\[ 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}}% \begin{codeblock} @@ -5477,12 +5401,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{n} $. +\pnum +\requires $0 < \tcode{n}$. -\pnum\effects Constructs a \tcode{chi_squared_distribution} object; - \tcode{n} - corresponds to the parameter of the distribution. +\pnum +\effects Constructs a \tcode{chi_squared_distribution} object; +\tcode{n} corresponds to the parameter of the distribution. \end{itemdescr} \indexlibrarymember{n}{chi_squared_distribution}% @@ -5510,11 +5434,7 @@ the probability density function% \indextext{probability density function!\idxcode{cauchy_distribution}}% \indextext{\idxcode{cauchy_distribution}!probability density function}% -\[% - p(x\,|\,a,b) - = \left( \pi b \left( 1 + \left( \frac{x-a}{b} \right)^2 \;\right)\right)^{-1} -\; \mbox{.} -\] +\[ p(x\,|\,a,b) = \left(\pi b \left(1 + \left(\frac{x-a}{b} \right)^2 \, \right)\right)^{-1} \text{ .} \] \indexlibrary{\idxcode{cauchy_distribution}}% \begin{codeblock} @@ -5553,12 +5473,13 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{b} $. +\pnum +\requires $0 < \tcode{b}$. -\pnum\effects Constructs a \tcode{cauchy_distribution} object; - \tcode{a} and \tcode{b} - correspond to the respective parameters of the distribution. +\pnum +\effects Constructs a \tcode{cauchy_distribution} object; +\tcode{a} and \tcode{b} +correspond to the respective parameters of the distribution. \end{itemdescr} \indexlibrarymember{a}{cauchy_distribution}% @@ -5591,23 +5512,16 @@ \pnum A \tcode{fisher_f_distribution} random number distribution -produces random numbers $x\ge0$ +produces random numbers $x \ge 0$ distributed according to the probability density function% \indextext{probability density function!\idxcode{fisher_f_distribution}}% \indextext{\idxcode{fisher_f_distribution}!probability density function}% -\[% - p(x\,|\,m,n) - = \frac{\Gamma\big((m+n)/2\big)} - {\Gamma(m/2) \; \Gamma(n/2)} - \cdot - \left(\frac{m}{n}\right)^{m/2} - \cdot - x^{(m/2)-1} - \cdot - {\left( 1 + \frac{m x}{n} \right)}^{-(m+n)/2} -\; \mbox{.} -\] +\[ p(x\,|\,m,n) = \frac{\Gamma\big((m+n)/2\big)}{\Gamma(m/2) \; \Gamma(n/2)} + \cdot \left(\frac{m}{n}\right)^{m/2} + \cdot x^{(m/2)-1} + \cdot \left(1 + \frac{m x}{n}\right)^{-(m + n)/2} + \text{ .} \] \indexlibrary{\idxcode{fisher_f_distribution}}% \begin{codeblock} @@ -5646,12 +5560,13 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{m} $ and $ 0 < \tcode{n} $. +\pnum +\requires $0 < \tcode{m}$ and $0 < \tcode{n}$. -\pnum\effects Constructs a \tcode{fisher_f_distribution} object; - \tcode{m} and \tcode{n} - correspond to the respective parameters of the distribution. +\pnum +\effects Constructs a \tcode{fisher_f_distribution} object; +\tcode{m} and \tcode{n} +correspond to the respective parameters of the distribution. \end{itemdescr} \indexlibrarymember{m}{fisher_f_distribution}% @@ -5689,15 +5604,10 @@ the probability density function% \indextext{probability density function!\idxcode{student_t_distribution}}% \indextext{\idxcode{student_t_distribution}!probability density function}% -\[% - p(x\,|\,n) - = \frac{1} - {\sqrt{n \pi}} - \cdot \frac{\Gamma\big((n+1)/2\big)} - {\Gamma(n/2)} - \cdot \left( 1+\frac{x^2}{n} \right) ^ {-(n+1)/2} -\; \mbox{.} -\] +\[ p(x\,|\,n) = \frac{1}{\sqrt{n \pi}} + \cdot \frac{\Gamma\big((n+1)/2\big)}{\Gamma(n/2)} + \cdot \left(1 + \frac{x^2}{n} \right)^{-(n+1)/2} + \text{ .} \] \indexlibrary{\idxcode{student_t_distribution}}% \begin{codeblock} @@ -5735,11 +5645,12 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires - $ 0 < \tcode{n} $. +\pnum +\requires $0 < \tcode{n}$. -\pnum\effects Constructs a \tcode{student_t_distribution} object; - \tcode{n} corresponds to the parameter of the distribution. +\pnum +\effects Constructs a \tcode{student_t_distribution} object; +\tcode{n} corresponds to the parameter of the distribution. \end{itemdescr} \indexlibrarymember{mean}{student_t_distribution}% @@ -5781,24 +5692,19 @@ the discrete probability function% \indextext{discrete probability function!\idxcode{discrete_distribution}}% \indextext{\idxcode{discrete_distribution}!discrete probability function}% -\[% - P(i\,|\,p_0,\ldots,p_{n-1}) - = p_i -\; \mbox{.} -\] +\[ P(i \,|\, p_0, \dotsc, p_{n-1}) = p_i \text{ .} \] \pnum Unless specified otherwise, the distribution parameters are calculated as: - $p_k = {w_k / S} \; \mbox{ for } k = 0, \ldots, n\!-\!1$ , -in which -the values $w_k$, +$p_k = {w_k / S}$ for $k = 0, \dotsc, n - 1$, +in which the values $w_k$, commonly known as the \techterm{weights}% \indextext{\idxcode{discrete_distribution}!weights}% \indextext{weights!\idxcode{discrete_distribution}}% , shall be non-negative, non-NaN, and non-infinity. Moreover, the following relation shall hold: - $ 0 < S = w_0 + \cdots + w_{n-1} $. +$0 < S = w_0 + \dotsb + w_{n - 1}$. \indexlibrary{\idxcode{discrete_distribution}}% \begin{codeblock} @@ -5841,11 +5747,10 @@ \begin{itemdescr} \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$. - \end{note} +with $n = 1$ and $p_0 = 1$. +\begin{note} +Such an object will always deliver the value $0$. +\end{note} \end{itemdescr} @@ -5856,21 +5761,22 @@ \end{itemdecl} \begin{itemdescr} -\pnum\requires +\pnum +\requires \tcode{InputIterator} shall satisfy the requirements of an input iterator\iref{input.iterators}. Moreover, \tcode{iterator_traits::value_type} shall denote a type that is convertible to \tcode{double}. If \tcode{firstW == lastW}, - let $ n = 1 $ - and $ w_0 = 1 $. + let $n = 1$ and $w_0 = 1$. Otherwise, $\bigl[\tcode{firstW}, \tcode{lastW}\bigr)$ shall form a sequence $w$ of length $n > 0$. -\pnum\effects Constructs a \tcode{discrete_distribution} object - with probabilities given by the formula above. +\pnum +\effects Constructs a \tcode{discrete_distribution} object +with probabilities given by the formula above. \end{itemdescr} @@ -5898,19 +5804,19 @@ Moreover, \tcode{double} shall be convertible to the type of \tcode{UnaryOperation}'s sole parameter. - If $ \tcode{nw} = 0 $, let $ n = 1 $, otherwise let $n = \tcode{nw}$. + If $\tcode{nw} = 0$, let $n = 1$, otherwise let $n = \tcode{nw}$. The relation - $ 0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n $ + $0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n$ shall hold. \pnum\effects Constructs a \tcode{discrete_distribution} object with probabilities given by the formula above, using the following values: If $\tcode{nw} = 0$, - let $ w_0 = 1 $. + let $w_0 = 1$. Otherwise, - let $ w_k = \tcode{fw}(\tcode{xmin} + k \cdot \delta + \delta / 2) $ - for $ k = 0, \ldots, n\!-\!1 $. + let $w_k = \tcode{fw}(\tcode{xmin} + k \cdot \delta + \delta / 2)$ + for $k = 0, \dotsc, n - 1$. \pnum\complexity The number of invocations of \tcode{fw} shall not exceed $n$. @@ -5924,8 +5830,8 @@ \begin{itemdescr} \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, \ldots, n\!-\!1 $. + and whose \tcode{operator[]} member returns $p_k$ + when invoked with argument $k$ for $k = 0, \dotsc, n - 1$. \end{itemdescr} @@ -5940,42 +5846,32 @@ \pnum A \tcode{piecewise_constant_distribution} random number distribution produces random numbers $x$, -$ b_0 \leq x < b_n $, +$b_0 \leq x < b_n$, uniformly distributed over each subinterval -$ [ b_i, b_{i+1} ) $ +$[ b_i, b_{i+1} )$ according to the probability density function \indextext{probability density function!\idxcode{piecewise_constant_distribution}}% \indextext{\idxcode{piecewise_constant_distribution}!probability density function}% -\[% - p(x\,|\,b_0,\ldots,b_n,\;\rho_0,\ldots,\rho_{n-1}) - = \rho_i -\; \mbox{,} -\mbox{ for } b_i \le x < b_{i+1} -\; \mbox{.} -\] +\[ p(x \,|\, b_0, \dotsc, b_n, \; \rho_0, \dotsc, \rho_{n-1}) = \rho_i + \text{ , for $b_i \le x < b_{i+1}$.} \] \pnum -The $n+1$ distribution parameters $b_i$, +The $n + 1$ distribution parameters $b_i$, also known as this distribution's \techterm{interval boundaries}% \indextext{\idxcode{piecewise_constant_distribution}!interval boundaries}% \indextext{interval boundaries!\idxcode{piecewise_constant_distribution}}% , shall satisfy the relation - $ b_i < b_{i+1} $ -for $i = 0, \ldots, n\!-\!1 $. +$b_i < b_{i + 1}$ for $i = 0, \dotsc, n - 1$. Unless specified otherwise, the remaining $n$ distribution parameters are calculated as: -\[% - \rho_k = \; - \frac{w_k}{S \cdot (b_{k+1}-b_k)} - \; \mbox{ for } k = 0, \ldots, n\!-\!1, -\] +\[ \rho_k = \frac{w_k}{S \cdot (b_{k+1}-b_k)} \text{ for } k = 0, \dotsc, n - 1 \text{ ,} \] in which the values $w_k$, commonly known as the \techterm{weights}% \indextext{\idxcode{piecewise_constant_distribution}!weights}% \indextext{weights!\idxcode{piecewise_constant_distribution}}% , shall be non-negative, non-NaN, and non-infinity. Moreover, the following relation shall hold: - $ 0 < S = w_0 + \cdots + w_{n-1} $. + $0 < S = w_0 + \dotsb + w_{n-1}$. \indexlibrary{\idxcode{piecewise_constant_distribution}}% \begin{codeblock} @@ -6023,10 +5919,10 @@ \begin{itemdescr} \pnum\effects Constructs a \tcode{piecewise_constant_distribution} object - with $ n = 1 $, - $\rho_0 = 1 $, - $ b_0 = 0 $, - and $ b_1 = 1 $. + with $n = 1$, + $\rho_0 = 1$, + $b_0 = 0$, + and $b_1 = 1$. \end{itemdescr} @@ -6048,10 +5944,10 @@ shall each denote a type that is convertible to \tcode{double}. If \tcode{firstB == lastB} or \tcode{++firstB == lastB}, - let $ n = 1 $, - $ w_0 = 1 $, - $ b_0 = 0 $, - and $ b_1 = 1 $. + let $n = 1$, + $w_0 = 1$, + $b_0 = 0$, + and $b_1 = 1$. Otherwise, $\bigl[\tcode{firstB}, \tcode{lastB}\bigr)$ shall form a sequence $b$ of length $n+1$, @@ -6084,15 +5980,15 @@ from the following values: If $\tcode{bl.size()} < 2$, let $n = 1$, - $ w_0 = 1 $, - $ b_0 = 0 $, - and $ b_1 = 1 $. + $w_0 = 1$, + $b_0 = 0$, + and $b_1 = 1$. Otherwise, let $\bigl[\tcode{bl.begin()}, \tcode{bl.end()}\bigr)$ - form a sequence $ b_0, \ldots, b_n $, + form a sequence $b_0, \dotsc, b_n$, and - let $ w_k = \tcode{fw}\bigl(\bigl(b_{k+1} + b_k\bigr) / 2\bigr) $ - for $ k = 0, \ldots, n\!-\!1 $. + let $w_k = \tcode{fw}\bigl(\bigl(b_{k+1} + b_k\bigr) / 2\bigr)$ + for $k = 0, \dotsc, n - 1$. \pnum\complexity The number of invocations of \tcode{fw} shall not exceed $n$. @@ -6113,15 +6009,15 @@ Moreover, \tcode{double} shall be convertible to the type of \tcode{UnaryOperation}'s sole parameter. - If $ \tcode{nw} = 0 $, let $ n = 1 $, otherwise let $n = \tcode{nw}$. - The relation $ 0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n $ + If $\tcode{nw} = 0$, let $n = 1$, otherwise let $n = \tcode{nw}$. + The relation $0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n$ shall hold. \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, \ldots, n $, - and $ w_k = \tcode{fw}(b_k + \delta / 2) $ for $ k = 0, \ldots, n\!-\!1 $. + 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 The number of invocations of \tcode{fw} shall not exceed $n$. @@ -6136,7 +6032,7 @@ \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, \ldots, n $. + when invoked with argument $k$ for $k = 0, \dotsc, n $. \end{itemdescr} \indexlibrarymember{densities}{piecewise_constant_distribution}% @@ -6148,7 +6044,7 @@ \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, \ldots, n\!-\!1 $. + when invoked with argument $k$ for $k = 0, \dotsc, n - 1$. \end{itemdescr} @@ -6163,43 +6059,32 @@ \pnum A \tcode{piecewise_linear_distribution} random number distribution produces random numbers $x$, -$ b_0 \leq x < b_n $, +$b_0 \leq x < b_n$, distributed over each subinterval -$ [ b_i, b_{i+1} ) $ +$[b_i, b_{i+1})$ according to the probability density function \indextext{probability density function!\idxcode{piecewise_linear_distribution}}% \indextext{\idxcode{piecewise_linear_distribution}!probability density function}% -\[% - p(x\,|\,b_0,\ldots,b_n,\;\rho_0,\ldots,\rho_n) - = \rho_i \cdot {\frac{b_{i+1} - x}{b_{i+1} - b_i}} - + \rho_{i+1} \cdot {\frac{x - b_i}{b_{i+1} - b_i}} -\; \mbox{,} -\mbox{ for } b_i \le x < b_{i+1} -\; \mbox{.} -\] +\[ p(x \,|\, b_0, \dotsc, b_n, \; \rho_0, \dotsc, \rho_n) + = \rho_{i} \cdot {\frac{b_{i+1} - x}{b_{i+1} - b_i}} + + \rho_{i+1} \cdot {\frac{x - b_i}{b_{i+1} - b_i}} + \text{ , for $b_i \le x < b_{i+1}$.} \] \pnum -The $n+1$ distribution parameters $b_i$, +The $n + 1$ distribution parameters $b_i$, also known as this distribution's \techterm{interval boundaries}% \indextext{\idxcode{piecewise_linear_distribution}!interval boundaries}% \indextext{interval boundaries!\idxcode{piecewise_linear_distribution}}% -, shall satisfy the relation - $ b_i < b_{i+1} $ -for $i = 0, \ldots, n\!-\!1 $. +, shall satisfy the relation $b_i < b_{i+1}$ for $i = 0, \dotsc, n - 1$. Unless specified otherwise, -the remaining $n+1$ distribution parameters are calculated as -$ \rho_k = {w_k / S} \; \mbox{ for } k = 0, \ldots, n $, -in which the values $w_k$, +the remaining $n + 1$ distribution parameters are calculated as +$\rho_k = {w_k / S}$ for $k = 0, \dotsc, n$, in which the values $w_k$, commonly known as the \techterm{weights at boundaries}% \indextext{\idxcode{piecewise_linear_distribution}!weights at boundaries}% \indextext{weights at boundaries!\idxcode{piecewise_linear_distribution}}% , shall be non-negative, non-NaN, and non-infinity. Moreover, the following relation shall hold: -\[% - 0 < S = \frac{1}{2} - \cdot \sum_{k=0}^{n-1} (w_k + w_{k+1}) \cdot (b_{k+1} - b_k) -\; \mbox{.} -\] +\[ 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}}% \begin{codeblock} @@ -6245,10 +6130,10 @@ \begin{itemdescr} \pnum\effects Constructs a \tcode{piecewise_linear_distribution} object - with $ n = 1 $, - $\rho_0 = \rho_1 = 1 $, - $ b_0 = 0 $, - and $ b_1 = 1 $. + with $n = 1$, + $\rho_0 = \rho_1 = 1$, + $b_0 = 0$, + and $b_1 = 1$. \end{itemdescr} \indexlibrary{\idxcode{piecewise_linear_distribution}!constructor} @@ -6269,16 +6154,16 @@ shall each denote a type that is convertible to \tcode{double}. If \tcode{firstB == lastB} or \tcode{++firstB == lastB}, - let $ n = 1 $, - $ \rho_0 = \rho_1 = 1 $, - $ b_0 = 0 $, - and $ b_1 = 1 $. + let $n = 1$, + $\rho_0 = \rho_1 = 1$, + $b_0 = 0$, + and $b_1 = 1$. Otherwise, $\bigl[\tcode{firstB}, \tcode{lastB}\bigr)$ shall form a sequence $b$ of length $n+1$, the length of the sequence $w$ starting from \tcode{firstW} shall be at least $n+1$, - and any $w_k$ for $k \geq n+1$ shall be ignored by the distribution. + and any $w_k$ for $k \geq n + 1$ shall be ignored by the distribution. \pnum\effects Constructs a \tcode{piecewise_linear_distribution} object with parameters as specified above. @@ -6305,15 +6190,15 @@ from the following values: If $\tcode{bl.size()} < 2$, let $n = 1$, - $ \rho_0 = \rho_1 = 1 $, - $ b_0 = 0 $, - and $ b_1 = 1 $. + $\rho_0 = \rho_1 = 1$, + $b_0 = 0$, + and $b_1 = 1$. Otherwise, let $\bigl[\tcode{bl.begin(),} \tcode{bl.end()}\bigr)$ - form a sequence $ b_0, \ldots, b_n $, + form a sequence $b_0, \dotsc, b_n$, and - let $ w_k = \tcode{fw}(b_k) $ - for $ k = 0, \ldots, n $. + let $w_k = \tcode{fw}(b_k)$ + for $k = 0, \dotsc, n$. \pnum\complexity The number of invocations of \tcode{fw} shall not exceed $n+1$. @@ -6334,15 +6219,15 @@ Moreover, \tcode{double} shall be convertible to the type of \tcode{UnaryOperation}'s sole parameter. - If $ \tcode{nw} = 0 $, let $ n = 1 $, otherwise let $n = \tcode{nw}$. - The relation $ 0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n $ + If $\tcode{nw} = 0$, let $n = 1$, otherwise let $n = \tcode{nw}$. + The relation $0 < \delta = (\tcode{xmax} - \tcode{xmin}) / n$ shall hold. \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, \ldots, n $, - and $ w_k = \tcode{fw}(b_k) $ for $ k = 0, \ldots, n $. + 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 The number of invocations of \tcode{fw} shall not exceed $n+1$. @@ -6357,7 +6242,7 @@ \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, \ldots, n $. + when invoked with argument $k$ for $k = 0, \dotsc, n$. \end{itemdescr} \indexlibrarymember{densities}{piecewise_linear_distribution}% @@ -6369,7 +6254,7 @@ \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, \ldots, n $. + when invoked with argument $k$ for $k = 0, \dotsc, n$. \end{itemdescr}% % \indextext{random number distributions!sampling|)}% @@ -7603,8 +7488,8 @@ \indexlibrarymember{operator==}{valarray}% \indexlibrarymember{operator"!=}{valarray}% \indexlibrarymember{operator<}{valarray}% -\indexlibrarymember{operator<=}{valarray}% \indexlibrarymember{operator>}{valarray}% +\indexlibrarymember{operator<=}{valarray}% \indexlibrarymember{operator>=}{valarray}% \indexlibrarymember{operator\&\&}{valarray}% \indexlibrarymember{operator"|"|}{valarray}% @@ -7818,21 +7703,16 @@ \end{codeblock} \pnum -The -\tcode{slice_array} -template is a helper template used by the -\tcode{slice} -subscript operator - +This template is a helper template used by the +\tcode{slice} subscript operator \begin{codeblock} slice_array valarray::operator[](slice); \end{codeblock} +\pnum It has reference semantics to a subset of an array specified by a \tcode{slice} object. - -\pnum \begin{example} The expression \tcode{a[slice(1, 5, 3)] = b;} @@ -8105,7 +7985,7 @@ \pnum This template is a helper template used by the -\tcode{slice} +\tcode{gslice} subscript operator \indexlibrary{\idxcode{gslice_array}}% @@ -8114,13 +7994,10 @@ gslice_array valarray::operator[](const gslice&); \end{itemdecl} -\begin{itemdescr} \pnum It has reference semantics to a subset of an array specified by a \tcode{gslice} object. - -\pnum Thus, the expression \tcode{a[gslice(1, length, stride)] = b} has the effect of assigning the elements of @@ -8128,7 +8005,6 @@ to a generalized slice of the elements in \tcode{a}. -\end{itemdescr} \rSec3[gslice.array.assign]{\tcode{gslice_array} assignment} @@ -8243,7 +8119,6 @@ mask_array valarray::operator[](const valarray&). \end{itemdecl} -\begin{itemdescr} \pnum It has reference semantics to a subset of an array specified by a boolean mask. Thus, the expression @@ -8258,7 +8133,6 @@ \tcode{mask} is \tcode{true}.) -\end{itemdescr} \rSec3[mask.array.assign]{\tcode{mask_array} assignment} @@ -8369,11 +8243,10 @@ indirect_array valarray::operator[](const valarray&). \end{itemdecl} -\begin{itemdescr} \pnum It has reference semantics to a subset of an array specified by an \tcode{indirect_array}. -Thus the expression +Thus, the expression \tcode{a[\brk{}indirect] = b;} has the effect of assigning the elements of \tcode{b} @@ -8381,7 +8254,6 @@ \tcode{a} whose indices appear in \tcode{indirect}. -\end{itemdescr} \rSec3[indirect.array.assign]{\tcode{indirect_array} assignment} @@ -10613,25 +10485,25 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the associated Laguerre polynomials of their respective arguments \tcode{n}, \tcode{m}, and \tcode{x}. -\pnum\returns -\[% - \mathsf{L}_n^m(x) = - (-1)^m \frac{\mathsf{d} ^ m} - {\mathsf{d}x ^ m} \, \mathsf{L}_{n+m}(x), - \quad \mbox{for $x \ge 0$} -\] +\pnum +\returns +\[ \mathsf{L}_n^m(x) = + (-1)^m \frac{\mathsf{d} ^ m}{\mathsf{d}x ^ m} \, \mathsf{L}_{n+m}(x) + \text{ ,\quad for $x \ge 0$,} \] where $n$ is \tcode{n}, $m$ is \tcode{m}, and $x$ is \tcode{x}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling associated Laguerre polynomials with \tcode{n >= 128} or \tcode{m >= 128}} if \tcode{n >= 128} or if \tcode{m >= 128}. @@ -10657,21 +10529,18 @@ of their respective arguments \tcode{l}, \tcode{m}, and \tcode{x}. -\pnum\returns -\[% - \mathsf{P}_\ell^m(x) = - (1 - x^2) ^ {m/2} - \: - \frac{ \mathsf{d} ^ m} - { \mathsf{d}x ^ m} \, \mathsf{P}_\ell(x), - \quad \mbox{for $|x| \le 1$} -\] +\pnum +\returns +\[ \mathsf{P}_\ell^m(x) = (1 - x^2) ^ {m/2} \: + \frac{\mathsf{d} ^ m}{\mathsf{d}x ^ m} \, \mathsf{P}_\ell(x) + \text{ ,\quad for $|x| \le 1$,} \] where $l$ is \tcode{l}, $m$ is \tcode{m}, and $x$ is \tcode{x}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling associated Legendre polynomials with \tcode{l >= 128}} if \tcode{l >= 128}. @@ -10690,20 +10559,17 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the beta function of their respective arguments \tcode{x} and \tcode{y}. -\pnum\returns -\[% - \mathsf{B}(x, y) = - \frac{ \Gamma(x) \, \Gamma(y) } - { \Gamma(x+y) }, - \quad \mbox{for $x > 0$,\, $y > 0$} -\] +\pnum +\returns +\[ \mathsf{B}(x, y) = \frac{\Gamma(x) \, \Gamma(y)}{\Gamma(x + y)} + \text{ ,\quad for $x > 0$,\, $y > 0$,} \] where $x$ is \tcode{x} and $y$ is \tcode{y}. @@ -10722,22 +10588,21 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the complete elliptic integral of the first kind of their respective arguments \tcode{k}. -\pnum\returns -\[% - \mathsf{K}(k) = - \mathsf{F}(k, \pi / 2), - \quad \mbox{for $|k| \le 1$} -\] +\pnum +\returns +\[ \mathsf{K}(k) = \mathsf{F}(k, \pi / 2) \text{ ,\quad for $|k| \le 1$,} \] where $k$ is \tcode{k}. -\pnum See also \ref{sf.cmath.ellint_1}. +\pnum +See also \ref{sf.cmath.ellint_1}. \end{itemdescr} \rSec3[sf.cmath.comp_ellint_2]{Complete elliptic integral of the second kind}% @@ -10753,23 +10618,21 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the complete elliptic integral of the second kind of their respective arguments \tcode{k}. -\pnum\returns -\[% - \mathsf{E}(k) = - \mathsf{E}(k, \pi / 2), -\quad \mbox{for $|k| \le 1$} -\] +\pnum +\returns +\[ \mathsf{E}(k) = \mathsf{E}(k, \pi / 2) \text{ ,\quad for $|k| \le 1$,} \] where $k$ is \tcode{k}. -\pnum See also \ref{sf.cmath.ellint_2}. +\pnum +See also \ref{sf.cmath.ellint_2}. \end{itemdescr} \rSec3[sf.cmath.comp_ellint_3]{Complete elliptic integral of the third kind}% @@ -10785,23 +10648,22 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the complete elliptic integral of the third kind of their respective arguments \tcode{k} and \tcode{nu}. -\pnum\returns -\[% - \mathsf{\Pi}(\nu, k) = \mathsf{\Pi}(\nu, k, \pi / 2), - \quad \mbox{for $|k| \le 1$} -\] +\pnum +\returns +\[ \mathsf{\Pi}(\nu, k) = \mathsf{\Pi}(\nu, k, \pi / 2) \text{ ,\quad for $|k| \le 1$,} \] where $k$ is \tcode{k} and $\nu$ is \tcode{nu}. -\pnum See also \ref{sf.cmath.ellint_3}. +\pnum +See also \ref{sf.cmath.ellint_3}. \end{itemdescr} \rSec3[sf.cmath.cyl_bessel_i]{Regular modified cylindrical Bessel functions}% @@ -10817,32 +10679,31 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the regular modified cylindrical Bessel functions of their respective arguments \tcode{nu} and \tcode{x}. -\pnum\returns -\[% - \mathsf{I}_\nu(x) = - \mathrm{i}^{-\nu} \mathsf{J}_\nu(\mathrm{i}x) - = - \sum_{k=0}^\infty \frac{(x/2)^{\nu+2k}} - {k! \: \Gamma(\nu+k+1)}, - \quad \mbox{for $x \ge 0$} -\] +\pnum +\returns +\[ \mathsf{I}_\nu(x) = + \mathrm{i}^{-\nu} \mathsf{J}_\nu(\mathrm{i}x) = + \sum_{k=0}^\infty \frac{(x/2)^{\nu+2k}}{k! \: \Gamma(\nu+k+1)} + \text{ ,\quad for $x \ge 0$,} \] where $\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 regular modified cylindrical Bessel 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.cyl_bessel_j]{Cylindrical Bessel functions of the first kind}% @@ -10866,12 +10727,9 @@ \tcode{nu} and \tcode{x}. \pnum\returns -\[% - \mathsf{J}_\nu(x) = - \sum_{k=0}^\infty \frac{(-1)^k (x/2)^{\nu+2k}} - {k! \: \Gamma(\nu+k+1)}, - \quad \mbox{for $x \ge 0$} -\] +\[ \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$,} \] where $\nu$ is \tcode{nu} and $x$ is \tcode{x}. @@ -11002,20 +10860,18 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the incomplete elliptic integral of the first kind of their respective arguments \tcode{k} and \tcode{phi} (\tcode{phi} measured in radians). -\pnum\returns -\[% - \mathsf{F}(k, \phi) = - \int_0^\phi \! \frac{\mathsf{d}\theta} - {\sqrt{1 - k^2 \sin^2 \theta}}, - \quad \mbox{for $|k| \le 1$} -\] +\pnum +\returns +\[ \mathsf{F}(k, \phi) = + \int_0^\phi \! \frac{\mathsf{d}\theta}{\sqrt{1 - k^2 \sin^2 \theta}} + \text{ ,\quad for $|k| \le 1$,} \] where $k$ is \tcode{k} and $\phi$ is \tcode{phi}. @@ -11034,19 +10890,17 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the incomplete elliptic integral of the second kind of their respective arguments \tcode{k} and \tcode{phi} (\tcode{phi} measured in radians). -\pnum\returns -\[% - \mathsf{E}(k, \phi) = - \int_0^\phi \! \sqrt{1 - k^2 \sin^2 \theta} \, \mathsf{d}\theta, - \quad \mbox{for $|k| \le 1$} -\] +\pnum +\returns +\[ \mathsf{E}(k, \phi) = \int_0^\phi \! \sqrt{1 - k^2 \sin^2 \theta} \, \mathsf{d}\theta + \text{ ,\quad for $|k| \le 1$,} \] where $k$ is \tcode{k} and $\phi$ is \tcode{phi}. @@ -11072,13 +10926,10 @@ of their respective arguments \tcode{k}, \tcode{nu}, and \tcode{phi} (\tcode{phi} measured in radians). -\pnum\returns -\[% - \mathsf{\Pi}(\nu, k, \phi) = - \int_0^\phi \! \frac{ \mathsf{d}\theta } - { (1 - \nu \, \sin^2 \theta) \sqrt{1 - k^2 \sin^2 \theta} }, - \quad \mbox{for $|k| \le 1$} -\] +\pnum +\returns +\[ \mathsf{\Pi}(\nu, k, \phi) = \int_0^\phi \! + \frac{ \mathsf{d}\theta }{ (1 - \nu \, \sin^2 \theta) \sqrt{1 - k^2 \sin^2 \theta} } \text{ ,\quad for $|k| \le 1$,} \] where $\nu$ is \tcode{nu}, $k$ is \tcode{k}, and @@ -11164,24 +11015,23 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the Laguerre polynomials of their respective arguments \tcode{n} and \tcode{x}. -\pnum\returns -\[% - \mathsf{L}_n(x) = - \frac{e^x}{n!} \frac{ \mathsf{d} ^ n} - { \mathsf{d}x ^ n} \, (x^n e^{-x}), - \quad \mbox{for $x \ge 0$} -\] +\pnum +\returns +\[ \mathsf{L}_n(x) = + \frac{e^x}{n!} \frac{\mathsf{d}^n}{\mathsf{d}x^n} \, (x^n e^{-x}) + \text{ ,\quad for $x \ge 0$,} \] where $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 Laguerre polynomials with \tcode{n >= 128}} if \tcode{n >= 128}. @@ -11200,26 +11050,24 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the Legendre polynomials of their respective arguments \tcode{l} and \tcode{x}. -\pnum\returns -\[% - \mathsf{P}_\ell(x) = - \frac{1} - {2^\ell \, \ell!} - \frac{ \mathsf{d} ^ \ell} - { \mathsf{d}x ^ \ell} \, (x^2 - 1) ^ \ell, - \quad \mbox{for $|x| \le 1$} -\] +\pnum +\returns +\[ \mathsf{P}_\ell(x) = + \frac{1}{2^\ell \, \ell!} + \frac{\mathsf{d}^\ell}{\mathsf{d}x^\ell} \, (x^2 - 1) ^ \ell + \text{ ,\quad for $|x| \le 1$,} \] where $l$ is \tcode{l} and $x$ is \tcode{x}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling Legendre polynomials with \tcode{l >= 128}} if \tcode{l >= 128}. @@ -11284,19 +11132,16 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the spherical Bessel functions of the first kind of their respective arguments \tcode{n} and \tcode{x}. -\pnum\returns -\[% - \mathsf{j}_n(x) = - (\pi/2x)^{1\!/\!2} \mathsf{J}_{n + 1\!/\!2}(x), - \quad \mbox{for $x \ge 0$} -\] +\pnum +\returns +\[ \mathsf{j}_n(x) = (\pi/2x)^{1\!/\!2} \mathsf{J}_{n + 1\!/\!2}(x) \text{ ,\quad for $x \ge 0$,} \] where $n$ is \tcode{n} and $x$ is \tcode{x}. @@ -11323,38 +11168,34 @@ \end{itemdecl} \begin{itemdescr} -\pnum\effects +\pnum +\effects These functions compute the spherical associated Legendre functions of their respective arguments \tcode{l}, \tcode{m}, and \tcode{theta} (\tcode{theta} measured in radians). -\pnum\returns -\[% - \mathsf{Y}_\ell^m(\theta, 0) -\;\] +\pnum +\returns +\[ \mathsf{Y}_\ell^m(\theta, 0) \] where -\[% - \mathsf{Y}_\ell^m(\theta, \phi) = - (-1)^m \left[ \frac{(2 \ell + 1)} - {4 \pi} - \frac{(\ell - m)!} - {(\ell + m)!} - \right]^{1/2} - \mathsf{P}_\ell^m - ( \cos\theta ) e ^ {i m \phi}, - \quad \mbox{for $|m| \le \ell$} +\[ \mathsf{Y}_\ell^m(\theta, \phi) = + (-1)^m \left[\frac{(2 \ell + 1)}{4 \pi} \frac{(\ell - m)!}{(\ell + m)!}\right]^{1/2} + \mathsf{P}_\ell^m (\cos\theta) e^{i m \phi} + \text{ ,\quad for $|m| \le \ell$,} \] and $l$ is \tcode{l}, $m$ is \tcode{m}, and $\theta$ is \tcode{theta}. -\pnum\remarks +\pnum +\remarks The effect of calling each of these functions is \impldef{effect of calling spherical associated Legendre functions with \tcode{l >= 128}} if \tcode{l >= 128}. -\pnum See also \ref{sf.cmath.assoc_legendre}. +\pnum +See also \ref{sf.cmath.assoc_legendre}. \end{itemdescr} \rSec3[sf.cmath.sph_neumann]{Spherical Neumann functions}% @@ -11371,29 +11212,29 @@ \end{itemdecl} \begin{itemdescr} - -\pnum\effects +\pnum +\effects These functions compute the spherical Neumann functions, also known as the spherical Bessel functions of the second kind, of their respective arguments \tcode{n} and \tcode{x}. -\pnum\returns -\[% - \mathsf{n}_n(x) = - (\pi/2x)^{1\!/\!2} \mathsf{N}_{n + 1\!/\!2}(x), - \quad \mbox{for $x \ge 0$} -\] +\pnum +\returns +\[ \mathsf{n}_n(x) = (\pi/2x)^{1\!/\!2} \mathsf{N}_{n + 1\!/\!2}(x) + \text{ ,\quad for $x \ge 0$,} \] where $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 Neumann functions with \tcode{n >= 128}} if \tcode{n >= 128}. -\pnum See also \ref{sf.cmath.cyl_neumann}. +\pnum +See also \ref{sf.cmath.cyl_neumann}. \end{itemdescr} \indextext{mathematical special functions|)} diff --git a/source/overloading.tex b/source/overloading.tex index 85e5832f5b..c0977774d4 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -439,9 +439,8 @@ invocation of a conversion function for initialization of an object of a non-class type from an expression of class type\iref{over.match.conv}; and \item -invocation of a conversion function for conversion to a glvalue -or class prvalue -to which a reference\iref{dcl.init.ref} +invocation of a conversion function for conversion +in which a reference\iref{dcl.init.ref} will be directly bound\iref{over.match.ref}. \end{itemize} @@ -1271,15 +1270,10 @@ \tcode{T} or is a derived class thereof are candidate functions. -Conversion functions that return ``reference to -\tcode{X}'' -return -lvalues or xvalues, depending on the type of reference, of type -\tcode{X} -and are therefore considered to yield -\tcode{X} -for this -process of selecting candidate functions. +A call to a conversion function returning ``reference to \tcode{X}'' +is a glvalue of type \tcode{X}, and such a conversion function is +therefore considered to yield \tcode{X} for this process of selecting +candidate functions. \end{itemize} \pnum @@ -1330,17 +1324,10 @@ Conversion functions that return a cv-qualified type are considered to yield the cv-unqualified version of that type for this process of selecting candidate functions. -Conversion functions that return ``reference to -\cvqual{cv2} -\tcode{X}'' -return -lvalues or xvalues, depending on the type of reference, of type -``\cvqual{cv2} -\tcode{X}'' -and are therefore considered to yield -\tcode{X} -for this -process of selecting candidate functions. +A call to a conversion function returning ``reference to \tcode{X}'' +is a glvalue of type \tcode{X}, and such a conversion function is +therefore considered to yield \tcode{X} for this process of selecting +candidate functions. \end{itemize} \pnum @@ -1355,7 +1342,7 @@ \pnum Under the conditions specified in~\ref{dcl.init.ref}, a reference can be bound directly -to a glvalue or class prvalue that is the result of applying a conversion +to the result of applying a conversion function to an initializer expression. Overload resolution is used to select the conversion function to be invoked. @@ -3073,17 +3060,17 @@ \terminal{operator} operator \end{bnf} -\begin{bnfkeywordtab} +\begin{bnf} +%% Ed. note: character protrusion would misalign various operators. +\microtypesetup{protrusion=false}\obeyspaces \nontermdef{operator} \textnormal{one of}\br -\>new\>delete\>new[]\>delete[]\>(\,)\>[\,]\>->\>->*\>\~\br -\>!\>+\>-\>*\>/\>\%\>\caret\>\&\>|\br -\>=\>+=\>-=\>*=\>/=\>\%=\>\caret=\>\&=\>|=\br -\>={=}\>!=\><\>>\><=\>>=\><=>\>\&\&\>|{|}\br -\><<\>>>\><<=\>>>=\>++\>-{-}\>,\br -\end{bnfkeywordtab} + \terminal{new delete new[] delete[] (\rlap{\,)} [\rlap{\,]} -> ->* \~}\br + \terminal{! + - * / \% \caret{} \& |}\br + \terminal{= += -= *= /= \%= \caret{}= \&= |=}\br + \terminal{== != < > <= >= <=> \&\& ||}\br + \terminal{<< >> <<= >>= ++ -- ,}\br +\end{bnf} \begin{note} -The last two operators are function call\iref{expr.call} -and subscripting\iref{expr.sub}. The operators \tcode{new[]}, \tcode{delete[]}, @@ -3091,27 +3078,25 @@ and \tcode{[]} are formed from more than one token. +The latter two operators are function call\iref{expr.call} +and subscripting\iref{expr.sub}. \end{note} \indextext{operator!subscripting}% \indextext{operator!function call}% \pnum Both the unary and binary forms of - -\begin{codeblock} -+ - * & -\end{codeblock} - +\begin{ncsimplebnf}\obeyspaces +\terminal{+ - * \&} +\end{ncsimplebnf} can be overloaded. \pnum \indextext{restriction!operator overloading}% The following operators cannot be overloaded: - -\begin{codeblock} -. .* :: ?: -\end{codeblock} - +\begin{ncsimplebnf}\obeyspaces +\terminal{. .* :: ?:} +\end{ncsimplebnf} nor can the preprocessing symbols \tcode{\#} and @@ -3749,12 +3734,12 @@ @\placeholder{LR}@ operator/(@\placeholder{L}@, @\placeholder{R}@); @\placeholder{LR}@ operator+(@\placeholder{L}@, @\placeholder{R}@); @\placeholder{LR}@ operator-(@\placeholder{L}@, @\placeholder{R}@); +bool operator==(@\placeholder{L}@, @\placeholder{R}@); +bool operator!=(@\placeholder{L}@, @\placeholder{R}@); bool operator<(@\placeholder{L}@, @\placeholder{R}@); bool operator>(@\placeholder{L}@, @\placeholder{R}@); bool operator<=(@\placeholder{L}@, @\placeholder{R}@); bool operator>=(@\placeholder{L}@, @\placeholder{R}@); -bool operator==(@\placeholder{L}@, @\placeholder{R}@); -bool operator!=(@\placeholder{L}@, @\placeholder{R}@); \end{codeblock} where @@ -3811,12 +3796,12 @@ there exist candidate operator functions of the form \begin{codeblock} +bool operator==(@\placeholder{T}@, @\placeholder{T}@); +bool operator!=(@\placeholder{T}@, @\placeholder{T}@); bool operator<(@\placeholder{T}@, @\placeholder{T}@); bool operator>(@\placeholder{T}@, @\placeholder{T}@); bool operator<=(@\placeholder{T}@, @\placeholder{T}@); bool operator>=(@\placeholder{T}@, @\placeholder{T}@); -bool operator==(@\placeholder{T}@, @\placeholder{T}@); -bool operator!=(@\placeholder{T}@, @\placeholder{T}@); @\placeholdernc{R}@ operator<=>(@\placeholder{T}@, @\placeholder{T}@); \end{codeblock} diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 7ec0e0e122..2edf938079 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -47,31 +47,31 @@ \terminal{\#} conditionally-supported-directive \end{bnf} -\begin{bnftab} +\begin{bnf}\obeyspaces \nontermdef{control-line}\br -\>\terminal{\# include}\>\>pp-tokens new-line\br -\>\terminal{\# define}\>\>identifier replacement-list new-line\br -\>\terminal{\# define}\>\>identifier lparen \opt{identifier-list} \terminal{)} replacement-list new-line\br -\>\terminal{\# define}\>\>identifier lparen \terminal{... )} replacement-list new-line\br -\>\terminal{\# define}\>\>identifier lparen identifier-list \terminal{, ... )} replacement-list new-line\br -\>\terminal{\# undef}\>\>identifier new-line\br -\>\terminal{\# line}\>\>pp-tokens new-line\br -\>\terminal{\# error}\>\>\opt{pp-tokens} new-line\br -\>\terminal{\# pragma}\>\>\opt{pp-tokens} new-line\br -\>\terminal{\# }new-line -\end{bnftab} + \terminal{\# include} pp-tokens new-line\br + \terminal{\# define } identifier replacement-list new-line\br + \terminal{\# define } identifier lparen \opt{identifier-list} \terminal{)} replacement-list new-line\br + \terminal{\# define } identifier lparen \terminal{... )} replacement-list new-line\br + \terminal{\# define } identifier lparen identifier-list \terminal{, ... )} replacement-list new-line\br + \terminal{\# undef } identifier new-line\br + \terminal{\# line } pp-tokens new-line\br + \terminal{\# error } \opt{pp-tokens} new-line\br + \terminal{\# pragma } \opt{pp-tokens} new-line\br + \terminal{\# }new-line +\end{bnf} \begin{bnf} \nontermdef{if-section}\br if-group \opt{elif-groups} \opt{else-group} endif-line \end{bnf} -\begin{bnftab} +\begin{bnf}\obeyspaces \nontermdef{if-group}\br -\>\terminal{\# if}\>\>constant-expression new-line \opt{group}\br -\>\terminal{\# ifdef}\>\>identifier new-line \opt{group}\br -\>\terminal{\# ifndef}\>\>identifier new-line \opt{group} -\end{bnftab} + \terminal{\# if } constant-expression new-line \opt{group}\br + \terminal{\# ifdef } identifier new-line \opt{group}\br + \terminal{\# ifndef } identifier new-line \opt{group} +\end{bnf} \begin{bnf} \nontermdef{elif-groups}\br @@ -79,20 +79,20 @@ elif-groups elif-group \end{bnf} -\begin{bnftab} +\begin{bnf}\obeyspaces \nontermdef{elif-group}\br -\>\terminal{\# elif}\>\>constant-expression new-line \opt{group} -\end{bnftab} + \terminal{\# elif } constant-expression new-line \opt{group} +\end{bnf} -\begin{bnftab} +\begin{bnf}\obeyspaces \nontermdef{else-group}\br -\>\terminal{\# else}\>\>new-line \opt{group} -\end{bnftab} + \terminal{\# else } new-line \opt{group} +\end{bnf} -\begin{bnftab} +\begin{bnf}\obeyspaces \nontermdef{endif-line}\br -\>\terminal{\# endif}\>\>new-line -\end{bnftab} + \terminal{\# endif } new-line +\end{bnf} \begin{bnf} \nontermdef{text-line}\br @@ -271,14 +271,12 @@ \pnum Preprocessing directives of the forms - -\begin{ncbnftab} +\begin{ncsimplebnf}\obeyspaces \indextext{\idxcode{\#if}}% -\terminal{\# if}\>\>constant-expression new-line \opt{group}\br +\terminal{\# if } constant-expression new-line \opt{group}\br \indextext{\idxcode{\#elif}}% -\terminal{\# elif}\>\>constant-expression new-line \opt{group} -\end{ncbnftab} - +\terminal{\# elif } constant-expression new-line \opt{group} +\end{ncsimplebnf} check whether the controlling constant expression evaluates to nonzero. \pnum @@ -367,14 +365,12 @@ \pnum Preprocessing directives of the forms - -\begin{ncbnftab} -\terminal{\# ifdef}\>\>identifier new-line \opt{group}\br +\begin{ncsimplebnf}\obeyspaces +\terminal{\# ifdef } identifier new-line \opt{group}\br \indextext{\idxcode{\#ifdef}}% -\terminal{\# ifndef}\>\>identifier new-line \opt{group} +\terminal{\# ifndef } identifier new-line \opt{group} \indextext{\idxcode{\#ifndef}}% -\end{ncbnftab} - +\end{ncsimplebnf} check whether the identifier is or is not currently defined as a macro name. Their conditions are equivalent to \tcode{\#if} diff --git a/source/regex.tex b/source/regex.tex index 95db9fb1d2..148733da5f 100644 --- a/source/regex.tex +++ b/source/regex.tex @@ -301,12 +301,12 @@ bool operator!=(const sub_match& lhs, const sub_match& rhs); template bool operator<(const sub_match& lhs, const sub_match& rhs); + template + bool operator>(const sub_match& lhs, const sub_match& rhs); template bool operator<=(const sub_match& lhs, const sub_match& rhs); template bool operator>=(const sub_match& lhs, const sub_match& rhs); - template - bool operator>(const sub_match& lhs, const sub_match& rhs); template bool operator==( @@ -325,11 +325,11 @@ const basic_string::value_type, ST, SA>& lhs, const sub_match& rhs); template - bool operator>=( + bool operator<=( const basic_string::value_type, ST, SA>& lhs, const sub_match& rhs); template - bool operator<=( + bool operator>=( const basic_string::value_type, ST, SA>& lhs, const sub_match& rhs); @@ -350,11 +350,11 @@ const sub_match& lhs, const basic_string::value_type, ST, SA>& rhs); template - bool operator>=( + bool operator<=( const sub_match& lhs, const basic_string::value_type, ST, SA>& rhs); template - bool operator<=( + bool operator>=( const sub_match& lhs, const basic_string::value_type, ST, SA>& rhs); @@ -371,10 +371,10 @@ bool operator>(const typename iterator_traits::value_type* lhs, const sub_match& rhs); template - bool operator>=(const typename iterator_traits::value_type* lhs, + bool operator<=(const typename iterator_traits::value_type* lhs, const sub_match& rhs); template - bool operator<=(const typename iterator_traits::value_type* lhs, + bool operator>=(const typename iterator_traits::value_type* lhs, const sub_match& rhs); template @@ -390,10 +390,10 @@ bool operator>(const sub_match& lhs, const typename iterator_traits::value_type* rhs); template - bool operator>=(const sub_match& lhs, + bool operator<=(const sub_match& lhs, const typename iterator_traits::value_type* rhs); template - bool operator<=(const sub_match& lhs, + bool operator>=(const sub_match& lhs, const typename iterator_traits::value_type* rhs); template @@ -409,10 +409,10 @@ bool operator>(const typename iterator_traits::value_type& lhs, const sub_match& rhs); template - bool operator>=(const typename iterator_traits::value_type& lhs, + bool operator<=(const typename iterator_traits::value_type& lhs, const sub_match& rhs); template - bool operator<=(const typename iterator_traits::value_type& lhs, + bool operator>=(const typename iterator_traits::value_type& lhs, const sub_match& rhs); template @@ -428,10 +428,10 @@ bool operator>(const sub_match& lhs, const typename iterator_traits::value_type& rhs); template - bool operator>=(const sub_match& lhs, + bool operator<=(const sub_match& lhs, const typename iterator_traits::value_type& rhs); template - bool operator<=(const sub_match& lhs, + bool operator>=(const sub_match& lhs, const typename iterator_traits::value_type& rhs); template @@ -1933,34 +1933,34 @@ \pnum\returns \tcode{lhs.compare(rhs) < 0}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator<=}% +\indexlibrarymember{sub_match}{operator>}% \begin{itemdecl} template - bool operator<=(const sub_match& lhs, const sub_match& rhs); + bool operator>(const sub_match& lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{lhs.compare(rhs) <= 0}. +\pnum\returns \tcode{lhs.compare(rhs) > 0}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator>=}% +\indexlibrarymember{sub_match}{operator<=}% \begin{itemdecl} template - bool operator>=(const sub_match& lhs, const sub_match& rhs); + bool operator<=(const sub_match& lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{lhs.compare(rhs) >= 0}. +\pnum\returns \tcode{lhs.compare(rhs) <= 0}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator>}% +\indexlibrarymember{sub_match}{operator>=}% \begin{itemdecl} template - bool operator>(const sub_match& lhs, const sub_match& rhs); + bool operator>=(const sub_match& lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{lhs.compare(rhs) > 0}. +\pnum\returns \tcode{lhs.compare(rhs) >= 0}. \end{itemdescr} \indexlibrarymember{sub_match}{operator==}% @@ -2019,28 +2019,28 @@ \pnum\returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator>=}% +\indexlibrarymember{sub_match}{operator<=}% \begin{itemdecl} template - bool operator>=( + bool operator<=( const basic_string::value_type, ST, SA>& lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!(lhs < rhs)}. +\pnum\returns \tcode{!(rhs < lhs)}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator<=}% +\indexlibrarymember{sub_match}{operator>=}% \begin{itemdecl} template - bool operator<=( + bool operator>=( const basic_string::value_type, ST, SA>& lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!(rhs < lhs)}. +\pnum\returns \tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrarymember{operator==}{sub_match}% @@ -2101,28 +2101,28 @@ \pnum\returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{operator>=}{sub_match}% +\indexlibrarymember{operator<=}{sub_match}% \begin{itemdecl} template - bool operator>=( + bool operator<=( const sub_match& lhs, const basic_string::value_type, ST, SA>& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!(lhs < rhs)}. +\pnum\returns \tcode{!(rhs < lhs)}. \end{itemdescr} -\indexlibrarymember{operator<=}{sub_match}% +\indexlibrarymember{operator>=}{sub_match}% \begin{itemdecl} template - bool operator<=( + bool operator>=( const sub_match& lhs, const basic_string::value_type, ST, SA>& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!(rhs < lhs)}. +\pnum\returns \tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrarymember{sub_match}{operator==}% @@ -2169,26 +2169,26 @@ \pnum\returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator>=}% +\indexlibrarymember{sub_match}{operator<=}% \begin{itemdecl} template - bool operator>=(const typename iterator_traits::value_type* lhs, + bool operator<=(const typename iterator_traits::value_type* lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!(lhs < rhs)}. +\pnum\returns \tcode{!(rhs < lhs)}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator<=}% +\indexlibrarymember{sub_match}{operator>=}% \begin{itemdecl} template - bool operator<=(const typename iterator_traits::value_type* lhs, + bool operator>=(const typename iterator_traits::value_type* lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!(rhs < lhs)}. +\pnum\returns \tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrarymember{sub_match}{operator==}% @@ -2235,27 +2235,27 @@ \pnum\returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator>=}% +\indexlibrarymember{sub_match}{operator<=}% \begin{itemdecl} template - bool operator>=(const sub_match& lhs, + bool operator<=(const sub_match& lhs, const typename iterator_traits::value_type* rhs); \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{!(lhs < rhs)}. +\pnum +\returns \tcode{!(rhs < lhs)}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator<=}% +\indexlibrarymember{sub_match}{operator>=}% \begin{itemdecl} template - bool operator<=(const sub_match& lhs, + bool operator>=(const sub_match& lhs, const typename iterator_traits::value_type* rhs); \end{itemdecl} \begin{itemdescr} -\pnum -\returns \tcode{!(rhs < lhs)}. +\pnum\returns \tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrarymember{sub_match}{operator==}% @@ -2306,28 +2306,28 @@ \returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator>=}% +\indexlibrarymember{sub_match}{operator<=}% \begin{itemdecl} template - bool operator>=(const typename iterator_traits::value_type& lhs, + bool operator<=(const typename iterator_traits::value_type& lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(lhs < rhs)}. +\returns \tcode{!(rhs < lhs)}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator<=}% +\indexlibrarymember{sub_match}{operator>=}% \begin{itemdecl} template - bool operator<=(const typename iterator_traits::value_type& lhs, + bool operator>=(const typename iterator_traits::value_type& lhs, const sub_match& rhs); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(rhs < lhs)}. +\returns \tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrarymember{sub_match}{operator==}% @@ -2378,28 +2378,28 @@ \returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator>=}% +\indexlibrarymember{sub_match}{operator<=}% \begin{itemdecl} template - bool operator>=(const sub_match& lhs, + bool operator<=(const sub_match& lhs, const typename iterator_traits::value_type& rhs); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(lhs < rhs)}. +\returns \tcode{!(rhs < lhs)}. \end{itemdescr} -\indexlibrarymember{sub_match}{operator<=}% +\indexlibrarymember{sub_match}{operator>=}% \begin{itemdecl} template - bool operator<=(const sub_match& lhs, + bool operator>=(const sub_match& lhs, const typename iterator_traits::value_type& rhs); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(rhs < lhs)}. +\returns \tcode{!(lhs < rhs)}. \end{itemdescr} \indexlibrary{\idxcode{basic_ostream}}% diff --git a/source/special.tex b/source/special.tex index 918ef4ba66..9a6546c603 100644 --- a/source/special.tex +++ b/source/special.tex @@ -1058,7 +1058,7 @@ \pnum \begin{note} A declaration of a destructor that does not have a \grammarterm{noexcept-specifier} -has the same exception specification as if had been implicitly declared\iref{except.spec}. +has the same exception specification as if it had been implicitly declared\iref{except.spec}. \end{note} \pnum @@ -3338,16 +3338,16 @@ form a list of subobjects. In that list, any subobject of array type is recursively expanded to the sequence of its elements, in the order of increasing subscript. -Let \tcode{x}$_i$ be an lvalue denoting the $i^\textrm{th}$ element +Let $\tcode{x}_i$ be an lvalue denoting the $i^\text{th}$ element in the expanded list of subobjects for an object \tcode{x} (of length $n$), -where \tcode{x}$_i$ is +where $\tcode{x}_i$ is formed by a sequence of derived-to-base conversions\iref{over.best.ics}, class member access expressions\iref{expr.ref}, and array subscript expressions\iref{expr.sub} applied to \tcode{x}. -The type of the expression \tcode{x}$_i$ \tcode{<=>} \tcode{x}$_i$ -is denoted by \tcode{R}$_i$. +The type of the expression $\tcode{x}_i$ \tcode{<=>} $\tcode{x}_i$ +is denoted by $\tcode{R}_i$. It is unspecified whether virtual base class subobjects are compared more than once. @@ -3357,11 +3357,11 @@ is \tcode{auto}, then the return type is deduced as the common comparison type (see below) of -\tcode{R}$_0$, \tcode{R}$_1$, $\cdots$, \tcode{R}$_{n-1}$. +$\tcode{R}_0$, $\tcode{R}_1$, $\dotsc$, $\tcode{R}_{n-1}$. \begin{note} Otherwise, the program will be ill-formed -if the expression \tcode{x}$_i$ \tcode{<=>} \tcode{x}$_i$ +if the expression $\tcode{x}_i$ \tcode{<=>} $\tcode{x}_i$ is not implicitly convertible to the declared return type for any $i$. \end{note} If the return type is deduced as \tcode{void}, @@ -3372,46 +3372,46 @@ of the defaulted three-way comparison operator function with parameters \tcode{x} and \tcode{y} of the same type is determined by comparing corresponding elements -\tcode{x}$_i$ and \tcode{y}$_i$ +$\tcode{x}_i$ and $\tcode{y}_i$ in the expanded lists of subobjects for \tcode{x} and \tcode{y} until the first index $i$ -where \tcode{x}$_i$ \tcode{<=>} \tcode{y}$_i$ -yields a result value \tcode{v}$_i$ where \tcode{v}$_i$\tcode{ != 0}, +where $\tcode{x}_i$ \tcode{<=>} $\tcode{y}_i$ +yields a result value $\tcode{v}_i$ where $\tcode{v}_i \mathrel{\tcode{!=}} 0$, contextually converted to \tcode{bool}, yields \tcode{true}; -\tcode{V} is \tcode{v}$_i$ converted to \tcode{R}. +\tcode{V} is $\tcode{v}_i$ converted to \tcode{R}. If no such index exists, \tcode{V} is \tcode{std::strong_ordering::equal} converted to \tcode{R}. \pnum The \defn{common comparison type} \tcode{U} of a possibly-empty list of $n$ types -\tcode{T}$_0$, \tcode{T}$_1$, $\cdots$, \tcode{T}$_{n-1}$ +$\tcode{T}_0$, $\tcode{T}_1$, $\dotsc$, $\tcode{T}_{n-1}$ is defined as follows: \begin{itemize} \item -If any \tcode{T}$_i$ +If any $\tcode{T}_i$ is not a comparison category type\iref{cmp.categories}, \tcode{U} is \tcode{void}. \item Otherwise, if -at least one \tcode{T}$_i$ is \tcode{std::weak_equality}, or -at least one \tcode{T}$_i$ is \tcode{std::strong_equality} and -at least one \tcode{T}$_j$ is \tcode{std::partial_ordering} or +at least one $\tcode{T}_i$ is \tcode{std::weak_equality}, or +at least one $\tcode{T}_i$ is \tcode{std::strong_equality} and +at least one $\tcode{T}_j$ is \tcode{std::partial_ordering} or \tcode{std::weak_ordering}, \tcode{U} is \tcode{std::weak_equality}\iref{cmp.weakeq}. \item -Otherwise, if at least one \tcode{T}$_i$ is \tcode{std::strong_equality}, +Otherwise, if at least one $\tcode{T}_i$ is \tcode{std::strong_equality}, \tcode{U} is \tcode{std::strong_equality}\iref{cmp.strongeq}. \item -Otherwise, if at least one \tcode{T}$_i$ is \tcode{std::partial_ordering}, +Otherwise, if at least one $\tcode{T}_i$ is \tcode{std::partial_ordering}, \tcode{U} is \tcode{std::partial_ordering}\iref{cmp.partialord}. \item -Otherwise, if at least one \tcode{T}$_i$ is \tcode{std::weak_ordering}, +Otherwise, if at least one $\tcode{T}_i$ is \tcode{std::weak_ordering}, \tcode{U} is \tcode{std::weak_ordering}\iref{cmp.weakord}. \item diff --git a/source/statements.tex b/source/statements.tex index 666864ecc7..668fe3daf4 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -296,35 +296,27 @@ \pnum An \tcode{if} statement of the form - -\begin{ncbnf} +\begin{ncsimplebnf} \terminal{if \opt{constexpr} (} init-statement condition \terminal{)} statement -\end{ncbnf} - +\end{ncsimplebnf} is equivalent to - -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{\{}\br -\>init-statement\br -\>\terminal{if \opt{constexpr} (} condition \terminal{)} statement\br +\bnfindent init-statement\br +\bnfindent \terminal{if \opt{constexpr} (} condition \terminal{)} statement\br \terminal{\}} -\end{ncbnftab} - +\end{ncsimplebnf} and an \tcode{if} statement of the form - -\begin{ncbnf} +\begin{ncsimplebnf} \terminal{if \opt{constexpr} (} init-statement condition \terminal{)} statement \terminal{else} statement -\end{ncbnf} - +\end{ncsimplebnf} is equivalent to - -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{\{}\br -\>init-statement\br -\>\terminal{if \opt{constexpr} (} condition \terminal{)} statement \terminal{else} statement\br +\bnfindent init-statement\br +\bnfindent \terminal{if \opt{constexpr} (} condition \terminal{)} statement \terminal{else} statement\br \terminal{\}} -\end{ncbnftab} - +\end{ncsimplebnf} except that names declared in the \grammarterm{init-statement} are in the same declarative region as those declared in the \grammarterm{condition}. @@ -400,20 +392,16 @@ \pnum A \tcode{switch} statement of the form - -\begin{ncbnf} +\begin{ncsimplebnf} \terminal{switch (} init-statement condition \terminal{)} statement -\end{ncbnf} - +\end{ncsimplebnf} is equivalent to - -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{\{}\br -\>init-statement\br -\>\terminal{switch (} condition \terminal{)} statement\br +\bnfindent init-statement\br +\bnfindent \terminal{switch (} condition \terminal{)} statement\br \terminal{\}} -\end{ncbnftab} - +\end{ncsimplebnf} except that names declared in the \grammarterm{init-statement} are in the same declarative region as those declared in the \grammarterm{condition}.% @@ -513,23 +501,20 @@ \grammarterm{statement}. A \tcode{while} statement whose \grammarterm{condition} is an initialized declaration of some variable \tcode{t} is equivalent to - -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{label:}\br -\terminal{\{}\>\>\>// start of condition scope\br -\>condition \terminal{;}\>\>// declares \terminal{t}\br -\>\terminal{if (t) \{}\br -\>\>statement\br -\>\>\terminal{goto label;}\br -\>\terminal{\}}\br -\terminal{\}}\>\>\>// end of condition scope -\end{ncbnftab} - +\makebox[0pt][l]{\terminal{\{}}\bnfindent\bnfindent\bnfindent\bnfindent// start of condition scope\br +\bnfindent\makebox[0pt][l]{condition \terminal{;}}\bnfindent\bnfindent\bnfindent// declares \terminal{t}\br +\bnfindent \terminal{if (t) \{}\br +\bnfindent\bnfindent statement\br +\bnfindent\bnfindent \terminal{goto label;}\br +\bnfindent \terminal{\}}\br +\makebox[0pt][l]{\terminal{\}}}\bnfindent\bnfindent\bnfindent\bnfindent// end of condition scope +\end{ncsimplebnf} \begin{note} The variable created in the condition is destroyed and created with each iteration of the loop. \begin{example} - \begin{codeblock} struct A { int val; @@ -543,7 +528,6 @@ i = 0; } \end{codeblock} - In the while-loop, the constructor and destructor are each called twice, once for the condition that succeeds and once for the condition that fails. @@ -567,23 +551,19 @@ \pnum The \tcode{for} statement - -\begin{ncbnf} +\begin{ncsimplebnf} \terminal{for (} init-statement \opt{condition} \terminal{;} \opt{expression} \terminal{)} statement -\end{ncbnf} - +\end{ncsimplebnf} is equivalent to - -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{\{}\br -\>init-statement\br -\>\terminal{while (} condition \terminal{) \{}\br -\>\>statement\br -\>\>expression \terminal{;}\br -\>\terminal{\}}\br +\bnfindent init-statement\br +\bnfindent \terminal{while (} condition \terminal{) \{}\br +\bnfindent\bnfindent statement\br +\bnfindent\bnfindent expression \terminal{;}\br +\bnfindent \terminal{\}}\br \terminal{\}} -\end{ncbnftab} - +\end{ncsimplebnf} except that names declared in the \grammarterm{init-statement} are in the same declarative region as those declared in the \grammarterm{condition}, and except that a @@ -629,28 +609,23 @@ \pnum The range-based \tcode{for} statement - -\begin{ncbnf} +\begin{ncsimplebnf} \terminal{for (} \opt{init-statement} for-range-declaration \terminal{:} for-range-initializer \terminal{)} statement -\end{ncbnf} - +\end{ncsimplebnf} is equivalent to - -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{\{}\br -\>\opt{init-statement}\br -\>\terminal{auto \&\&__range =} for-range-initializer \terminal{;}\br -\>\terminal{auto __begin =} begin-expr \terminal{;}\br -\>\terminal{auto __end =} end-expr \terminal{;}\br -\>\terminal{for ( ; __begin != __end; ++__begin ) \{}\br -\>\>for-range-declaration \terminal{= *__begin;}\br -\>\>statement\br -\>\terminal{\}}\br +\bnfindent \opt{init-statement}\br +\bnfindent \terminal{auto \&\&__range =} for-range-initializer \terminal{;}\br +\bnfindent \terminal{auto __begin =} begin-expr \terminal{;}\br +\bnfindent \terminal{auto __end =} end-expr \terminal{;}\br +\bnfindent \terminal{for ( ; __begin != __end; ++__begin ) \{}\br +\bnfindent\bnfindent for-range-declaration \terminal{= *__begin;}\br +\bnfindent\bnfindent statement\br +\bnfindent \terminal{\}}\br \terminal{\}} -\end{ncbnftab} - +\end{ncsimplebnf} where - \begin{itemize} \item if the \grammarterm{for-range-initializer} is an \grammarterm{expression}, diff --git a/source/std.tex b/source/std.tex index 8335379149..7d3c73923b 100644 --- a/source/std.tex +++ b/source/std.tex @@ -43,7 +43,7 @@ plainpages=false ]{hyperref} \usepackage{memhfixc} % fix interactions between hyperref and memoir -\usepackage[active,header=false,handles=false,copydocumentclass=false,generate=std-gram.ext,extract-cmdline={gramSec},extract-env={bnftab,simplebnf,bnf,bnfkeywordtab}]{extract} % Grammar extraction +\usepackage[active,header=false,handles=false,copydocumentclass=false,generate=std-gram.ext,extract-cmdline={gramSec},extract-env={bnf,simplebnf}]{extract} % Grammar extraction \pdfminorversion=5 \pdfcompresslevel=9 diff --git a/source/support.tex b/source/support.tex index dbe3f613de..dc5ddd9e83 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4022,14 +4022,14 @@ friend constexpr bool operator==(partial_ordering v, @\unspec@) noexcept; friend constexpr bool operator!=(partial_ordering v, @\unspec@) noexcept; friend constexpr bool operator< (partial_ordering v, @\unspec@) noexcept; - friend constexpr bool operator<=(partial_ordering v, @\unspec@) noexcept; friend constexpr bool operator> (partial_ordering v, @\unspec@) noexcept; + friend constexpr bool operator<=(partial_ordering v, @\unspec@) noexcept; friend constexpr bool operator>=(partial_ordering v, @\unspec@) noexcept; friend constexpr bool operator==(@\unspec@, partial_ordering v) noexcept; friend constexpr bool operator!=(@\unspec@, partial_ordering v) noexcept; friend constexpr bool operator< (@\unspec@, partial_ordering v) noexcept; - friend constexpr bool operator<=(@\unspec@, partial_ordering v) noexcept; friend constexpr bool operator> (@\unspec@, partial_ordering v) noexcept; + friend constexpr bool operator<=(@\unspec@, partial_ordering v) noexcept; friend constexpr bool operator>=(@\unspec@, partial_ordering v) noexcept; friend constexpr partial_ordering operator<=>(partial_ordering v, @\unspec@) noexcept; friend constexpr partial_ordering operator<=>(@\unspec@, partial_ordering v) noexcept; @@ -4059,14 +4059,14 @@ \indexlibrarymember{operator==}{partial_ordering}% \indexlibrarymember{operator<}{partial_ordering}% -\indexlibrarymember{operator<=}{partial_ordering}% \indexlibrarymember{operator>}{partial_ordering}% +\indexlibrarymember{operator<=}{partial_ordering}% \indexlibrarymember{operator>=}{partial_ordering}% \begin{itemdecl} constexpr bool operator==(partial_ordering v, @\unspec@) noexcept; constexpr bool operator< (partial_ordering v, @\unspec@) noexcept; -constexpr bool operator<=(partial_ordering v, @\unspec@) noexcept; constexpr bool operator> (partial_ordering v, @\unspec@) noexcept; +constexpr bool operator<=(partial_ordering v, @\unspec@) noexcept; constexpr bool operator>=(partial_ordering v, @\unspec@) noexcept; \end{itemdecl} @@ -4078,14 +4078,14 @@ \indexlibrarymember{operator==}{partial_ordering}% \indexlibrarymember{operator<}{partial_ordering}% -\indexlibrarymember{operator<=}{partial_ordering}% \indexlibrarymember{operator>}{partial_ordering}% +\indexlibrarymember{operator<=}{partial_ordering}% \indexlibrarymember{operator>=}{partial_ordering}% \begin{itemdecl} constexpr bool operator==(@\unspec@, partial_ordering v) noexcept; constexpr bool operator< (@\unspec@, partial_ordering v) noexcept; -constexpr bool operator<=(@\unspec@, partial_ordering v) noexcept; constexpr bool operator> (@\unspec@, partial_ordering v) noexcept; +constexpr bool operator<=(@\unspec@, partial_ordering v) noexcept; constexpr bool operator>=(@\unspec@, partial_ordering v) noexcept; \end{itemdecl} @@ -4164,14 +4164,14 @@ friend constexpr bool operator==(weak_ordering v, @\unspec@) noexcept; friend constexpr bool operator!=(weak_ordering v, @\unspec@) noexcept; friend constexpr bool operator< (weak_ordering v, @\unspec@) noexcept; - friend constexpr bool operator<=(weak_ordering v, @\unspec@) noexcept; friend constexpr bool operator> (weak_ordering v, @\unspec@) noexcept; + friend constexpr bool operator<=(weak_ordering v, @\unspec@) noexcept; friend constexpr bool operator>=(weak_ordering v, @\unspec@) noexcept; friend constexpr bool operator==(@\unspec@, weak_ordering v) noexcept; friend constexpr bool operator!=(@\unspec@, weak_ordering v) noexcept; friend constexpr bool operator< (@\unspec@, weak_ordering v) noexcept; - friend constexpr bool operator<=(@\unspec@, weak_ordering v) noexcept; friend constexpr bool operator> (@\unspec@, weak_ordering v) noexcept; + friend constexpr bool operator<=(@\unspec@, weak_ordering v) noexcept; friend constexpr bool operator>=(@\unspec@, weak_ordering v) noexcept; friend constexpr weak_ordering operator<=>(weak_ordering v, @\unspec@) noexcept; friend constexpr weak_ordering operator<=>(@\unspec@, weak_ordering v) noexcept; @@ -4213,15 +4213,15 @@ \indexlibrarymember{operator==}{weak_ordering}% \indexlibrarymember{operator"!=}{weak_ordering}% \indexlibrarymember{operator<}{weak_ordering}% -\indexlibrarymember{operator<=}{weak_ordering}% \indexlibrarymember{operator>}{weak_ordering}% +\indexlibrarymember{operator<=}{weak_ordering}% \indexlibrarymember{operator>=}{weak_ordering}% \begin{itemdecl} constexpr bool operator==(weak_ordering v, @\unspec@) noexcept; constexpr bool operator!=(weak_ordering v, @\unspec@) noexcept; constexpr bool operator< (weak_ordering v, @\unspec@) noexcept; -constexpr bool operator<=(weak_ordering v, @\unspec@) noexcept; constexpr bool operator> (weak_ordering v, @\unspec@) noexcept; +constexpr bool operator<=(weak_ordering v, @\unspec@) noexcept; constexpr bool operator>=(weak_ordering v, @\unspec@) noexcept; \end{itemdecl} @@ -4234,15 +4234,15 @@ \indexlibrarymember{operator==}{weak_ordering}% \indexlibrarymember{operator"!=}{weak_ordering}% \indexlibrarymember{operator<}{weak_ordering}% -\indexlibrarymember{operator<=}{weak_ordering}% \indexlibrarymember{operator>}{weak_ordering}% +\indexlibrarymember{operator<=}{weak_ordering}% \indexlibrarymember{operator>=}{weak_ordering}% \begin{itemdecl} constexpr bool operator==(@\unspec@, weak_ordering v) noexcept; constexpr bool operator!=(@\unspec@, weak_ordering v) noexcept; constexpr bool operator< (@\unspec@, weak_ordering v) noexcept; -constexpr bool operator<=(@\unspec@, weak_ordering v) noexcept; constexpr bool operator> (@\unspec@, weak_ordering v) noexcept; +constexpr bool operator<=(@\unspec@, weak_ordering v) noexcept; constexpr bool operator>=(@\unspec@, weak_ordering v) noexcept; \end{itemdecl} @@ -4313,14 +4313,14 @@ friend constexpr bool operator==(strong_ordering v, @\unspec@) noexcept; friend constexpr bool operator!=(strong_ordering v, @\unspec@) noexcept; friend constexpr bool operator< (strong_ordering v, @\unspec@) noexcept; - friend constexpr bool operator<=(strong_ordering v, @\unspec@) noexcept; friend constexpr bool operator> (strong_ordering v, @\unspec@) noexcept; + friend constexpr bool operator<=(strong_ordering v, @\unspec@) noexcept; friend constexpr bool operator>=(strong_ordering v, @\unspec@) noexcept; friend constexpr bool operator==(@\unspec@, strong_ordering v) noexcept; friend constexpr bool operator!=(@\unspec@, strong_ordering v) noexcept; friend constexpr bool operator< (@\unspec@, strong_ordering v) noexcept; - friend constexpr bool operator<=(@\unspec@, strong_ordering v) noexcept; friend constexpr bool operator> (@\unspec@, strong_ordering v) noexcept; + friend constexpr bool operator<=(@\unspec@, strong_ordering v) noexcept; friend constexpr bool operator>=(@\unspec@, strong_ordering v) noexcept; friend constexpr strong_ordering operator<=>(strong_ordering v, @\unspec@) noexcept; friend constexpr strong_ordering operator<=>(@\unspec@, strong_ordering v) noexcept; @@ -4389,15 +4389,15 @@ \indexlibrarymember{operator==}{strong_ordering}% \indexlibrarymember{operator"!=}{strong_ordering}% \indexlibrarymember{operator<}{strong_ordering}% -\indexlibrarymember{operator<=}{strong_ordering}% \indexlibrarymember{operator>}{strong_ordering}% +\indexlibrarymember{operator<=}{strong_ordering}% \indexlibrarymember{operator>=}{strong_ordering}% \begin{itemdecl} constexpr bool operator==(strong_ordering v, @\unspec@) noexcept; constexpr bool operator!=(strong_ordering v, @\unspec@) noexcept; constexpr bool operator< (strong_ordering v, @\unspec@) noexcept; -constexpr bool operator<=(strong_ordering v, @\unspec@) noexcept; constexpr bool operator> (strong_ordering v, @\unspec@) noexcept; +constexpr bool operator<=(strong_ordering v, @\unspec@) noexcept; constexpr bool operator>=(strong_ordering v, @\unspec@) noexcept; \end{itemdecl} @@ -4410,15 +4410,15 @@ \indexlibrarymember{operator==}{strong_ordering}% \indexlibrarymember{operator"!=}{strong_ordering}% \indexlibrarymember{operator<}{strong_ordering}% -\indexlibrarymember{operator<=}{strong_ordering}% \indexlibrarymember{operator>}{strong_ordering}% +\indexlibrarymember{operator<=}{strong_ordering}% \indexlibrarymember{operator>=}{strong_ordering}% \begin{itemdecl} constexpr bool operator==(@\unspec@, strong_ordering v) noexcept; constexpr bool operator!=(@\unspec@, strong_ordering v) noexcept; constexpr bool operator< (@\unspec@, strong_ordering v) noexcept; -constexpr bool operator<=(@\unspec@, strong_ordering v) noexcept; constexpr bool operator> (@\unspec@, strong_ordering v) noexcept; +constexpr bool operator<=(@\unspec@, strong_ordering v) noexcept; constexpr bool operator>=(@\unspec@, strong_ordering v) noexcept; \end{itemdecl} diff --git a/source/templates.tex b/source/templates.tex index 40e795985b..983ee8d089 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -4622,9 +4622,9 @@ as described in this subclause. In an expression of the form: -\begin{ncbnftab} +\begin{ncsimplebnf} postfix-expression \terminal{(} \opt{expression-list} \terminal{)} -\end{ncbnftab} +\end{ncsimplebnf} where the \grammarterm{postfix-expression} @@ -5137,7 +5137,7 @@ \grammarterm{new-type-id} is dependent, even if any subexpression is type-dependent: -\begin{ncbnftab} +\begin{ncsimplebnf} simple-type-specifier \terminal{(} \opt{expression-list} \terminal{)}\br \terminal{\opt{::} new} \opt{new-placement} new-type-id \opt{new-initializer}\br \terminal{\opt{::} new} \opt{new-placement} \terminal{(} type-id \terminal{)} \opt{new-initializer}\br @@ -5146,13 +5146,13 @@ \terminal{const_cast <} type-id \terminal{> (} expression \terminal{)}\br \terminal{reinterpret_cast <} type-id \terminal{> (} expression \terminal{)}\br \terminal{(} type-id \terminal{)} cast-expression -\end{ncbnftab} +\end{ncsimplebnf} \pnum Expressions of the following forms are never type-dependent (because the type of the expression cannot be dependent): -\begin{ncbnftab} +\begin{ncsimplebnf} literal\br postfix-expression \terminal{.} pseudo-destructor-name\br postfix-expression \terminal{->} pseudo-destructor-name\br @@ -5166,7 +5166,7 @@ \terminal{\opt{::} delete [ ]} cast-expression\br \terminal{throw} \opt{assignment-expression}\br \terminal{noexcept} \terminal{(} expression \terminal{)} -\end{ncbnftab} +\end{ncsimplebnf} \begin{note} For the standard library macro \tcode{offsetof}, see~\ref{support.types}.\end{note} @@ -5245,14 +5245,14 @@ \grammarterm{type-id} is dependent: -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{sizeof} unary-expression\br \terminal{sizeof (} type-id \terminal{)}\br \terminal{typeid (} expression \terminal{)}\br \terminal{typeid (} type-id \terminal{)}\br \terminal{alignof (} type-id \terminal{)}\br \terminal{noexcept} \terminal{(} expression \terminal{)} -\end{ncbnftab} +\end{ncsimplebnf} \begin{note} For the standard library macro \tcode{offsetof}, see~\ref{support.types}.\end{note} @@ -5268,21 +5268,21 @@ \grammarterm{cast-expression} is value-dependent: -\begin{ncbnftab} +\begin{ncsimplebnf} simple-type-specifier \terminal{(} \opt{expression-list} \terminal{)}\br \terminal{static_cast <} type-id \terminal{> (} expression \terminal{)}\br \terminal{const_cast <} type-id \terminal{> (} expression \terminal{)}\br \terminal{reinterpret_cast <} type-id \terminal{> (} expression \terminal{)}\br \terminal{(} type-id \terminal{)} cast-expression -\end{ncbnftab} +\end{ncsimplebnf} \pnum Expressions of the following form are value-dependent: -\begin{ncbnftab} +\begin{ncsimplebnf} \terminal{sizeof} \terminal{...} \terminal{(} identifier \terminal{)}\br fold-expression -\end{ncbnftab} +\end{ncsimplebnf} \pnum An expression of the form \tcode{\&}\grammarterm{qualified-id} where the @@ -7995,9 +7995,9 @@ \pnum If, after considering the above, function template \tcode{F} is at least as specialized as function template \tcode{G} and vice-versa, and -if \tcode{G} has a trailing parameter pack +if \tcode{G} has a trailing function parameter pack for which \tcode{F} does not have a corresponding parameter, and -if \tcode{F} does not have a trailing parameter pack, +if \tcode{F} does not have a trailing function parameter pack, then \tcode{F} is more specialized than \tcode{G}. \pnum diff --git a/source/threads.tex b/source/threads.tex index 3dfd67e89c..50034e08f8 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -375,8 +375,8 @@ bool operator==(thread::id x, thread::id y) noexcept; bool operator!=(thread::id x, thread::id y) noexcept; bool operator<(thread::id x, thread::id y) noexcept; - bool operator<=(thread::id x, thread::id y) noexcept; bool operator>(thread::id x, thread::id y) noexcept; + bool operator<=(thread::id x, thread::id y) noexcept; bool operator>=(thread::id x, thread::id y) noexcept; template @@ -447,23 +447,23 @@ \returns A value such that \tcode{operator<} is a total ordering as described in~\ref{alg.sorting}. \end{itemdescr} -\indexlibrarymember{operator<=}{thread::id}% +\indexlibrarymember{operator>}{thread::id}% \begin{itemdecl} -bool operator<=(thread::id x, thread::id y) noexcept; +bool operator>(thread::id x, thread::id y) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum -\returns \tcode{!(y < x)}. +\pnum\returns \tcode{y < x}. \end{itemdescr} -\indexlibrarymember{operator>}{thread::id}% +\indexlibrarymember{operator<=}{thread::id}% \begin{itemdecl} -bool operator>(thread::id x, thread::id y) noexcept; +bool operator<=(thread::id x, thread::id y) noexcept; \end{itemdecl} \begin{itemdescr} -\pnum\returns \tcode{y < x}. +\pnum +\returns \tcode{!(y < x)}. \end{itemdescr} \indexlibrarymember{operator>=}{thread::id}% diff --git a/source/utilities.tex b/source/utilities.tex index 6aa99ed783..9edf5073a7 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -104,16 +104,16 @@ // \ref{pairs.spec}, pair specialized algorithms template constexpr bool operator==(const pair&, const pair&); - template - constexpr bool operator< (const pair&, const pair&); template constexpr bool operator!=(const pair&, const pair&); template - constexpr bool operator> (const pair&, const pair&); + constexpr bool operator< (const pair&, const pair&); template - constexpr bool operator>=(const pair&, const pair&); + constexpr bool operator> (const pair&, const pair&); template constexpr bool operator<=(const pair&, const pair&); + template + constexpr bool operator>=(const pair&, const pair&); template void swap(pair& x, pair& y) noexcept(noexcept(x.swap(y))); @@ -410,7 +410,7 @@ \pnum The library provides a class template that can represent an integer sequence. -When used as an argument to a function template the parameter pack defining the +When used as an argument to a function template the template parameter pack defining the sequence can be deduced and used in a pack expansion. \begin{note} The \tcode{index_sequence} alias template is provided for the common case of @@ -719,8 +719,8 @@ \begin{itemdescr} \pnum \effects -Assigns to \tcode{first} with \tcode{std::forward(p.first)} -and to \tcode{second} with\\ \tcode{std::forward(p.second)}. +Assigns to \tcode{first} with \tcode{std::forward(p.first)} +and to \tcode{second} with\\ \tcode{std::forward(p.second)}. \pnum \remarks This operator shall not participate in overload resolution unless @@ -768,27 +768,27 @@ \tcode{x.first == y.first \&\& x.second == y.second}. \end{itemdescr} -\indexlibrarymember{operator<}{pair}% +\indexlibrarymember{operator"!=}{pair}% \begin{itemdecl} template - constexpr bool operator<(const pair& x, const pair& y); + constexpr bool operator!=(const pair& x, const pair& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns -\tcode{x.first < y.first || (!(y.first < x.first) \&\& x.second < y.second)}. +\returns \tcode{!(x == y)}. \end{itemdescr} -\indexlibrarymember{operator"!=}{pair}% +\indexlibrarymember{operator<}{pair}% \begin{itemdecl} template - constexpr bool operator!=(const pair& x, const pair& y); + constexpr bool operator<(const pair& x, const pair& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(x == y)}. +\returns +\tcode{x.first < y.first || (!(y.first < x.first) \&\& x.second < y.second)}. \end{itemdescr} \indexlibrarymember{operator>}{pair}% @@ -802,26 +802,26 @@ \returns \tcode{y < x}. \end{itemdescr} -\indexlibrarymember{operator>=}{pair}% +\indexlibrarymember{operator<=}{pair}% \begin{itemdecl} template - constexpr bool operator>=(const pair& x, const pair& y); + constexpr bool operator<=(const pair& x, const pair& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(x < y)}. +\returns \tcode{!(y < x)}. \end{itemdescr} -\indexlibrarymember{operator<=}{pair}% +\indexlibrarymember{operator>=}{pair}% \begin{itemdecl} template - constexpr bool operator<=(const pair& x, const pair& y); + constexpr bool operator>=(const pair& x, const pair& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(y < x)}. +\returns \tcode{!(x < y)}. \end{itemdescr} @@ -1050,10 +1050,10 @@ // \ref{tuple.rel}, relational operators template constexpr bool operator==(const tuple&, const tuple&); - template - constexpr bool operator<(const tuple&, const tuple&); template constexpr bool operator!=(const tuple&, const tuple&); + template + constexpr bool operator<(const tuple&, const tuple&); template constexpr bool operator>(const tuple&, const tuple&); template @@ -1575,7 +1575,7 @@ \rSec3[tuple.creation]{Tuple creation functions} \pnum -In the function descriptions that follow, the members of a parameter pack \tcode{\placeholder{X}Types} +In the function descriptions that follow, the members of a template parameter pack \tcode{\placeholder{X}Types} are denoted by \tcode{\placeholder{X}}$_i$ for $i$ in \range{0}{sizeof...(\placeholder{X}Types)} in order, where indexing is zero-based. @@ -1668,7 +1668,7 @@ \pnum \requires For all $i$, $\tcode{U}_i$ shall be the type $\cv_i$ \tcode{tuple<$\tcode{Args}_i$...>}, where $\cv_i$ is the (possibly empty) $i^\text{th}$ -\grammarterm{cv-qualifier-seq} and $\tcode{Args}_i$ is the parameter pack representing the element +\grammarterm{cv-qualifier-seq} and $\tcode{Args}_i$ is the template parameter pack representing the element types in $\tcode{U}_i$. Let $\tcode{A}_{ik}$ be the ${k}^\text{th}$ type in $\tcode{Args}_i$. For all $\tcode{A}_{ik}$ the following requirements shall be satisfied: \begin{itemize} @@ -1696,7 +1696,7 @@ \pnum \begin{note} -An implementation may support additional types in the parameter +An implementation may support additional types in the template parameter pack \tcode{Tuples} that support the \tcode{tuple}-like protocol, such as \tcode{pair} and \tcode{array}. \end{note} @@ -1976,6 +1976,15 @@ \tcode{false}. \end{itemdescr} +\indexlibrarymember{operator"!=}{tuple}% +\begin{itemdecl} +template + constexpr bool operator!=(const tuple& t, const tuple& u); +\end{itemdecl} +\begin{itemdescr} +\pnum\returns \tcode{!(t == u)}. +\end{itemdescr} + \indexlibrarymember{operator<}{tuple}% \begin{itemdecl} template @@ -2003,15 +2012,6 @@ and \tcode{f}, \tcode{e < f} returns \tcode{false}. \end{itemdescr} -\indexlibrarymember{operator"!=}{tuple}% -\begin{itemdecl} -template - constexpr bool operator!=(const tuple& t, const tuple& u); -\end{itemdecl} -\begin{itemdescr} -\pnum\returns \tcode{!(t == u)}. -\end{itemdescr} - \indexlibrarymember{operator>}{tuple}% \begin{itemdecl} template @@ -2141,10 +2141,10 @@ template constexpr bool operator!=(nullopt_t, const optional&) noexcept; template constexpr bool operator<(const optional&, nullopt_t) noexcept; template constexpr bool operator<(nullopt_t, const optional&) noexcept; - template constexpr bool operator<=(const optional&, nullopt_t) noexcept; - template constexpr bool operator<=(nullopt_t, const optional&) noexcept; template constexpr bool operator>(const optional&, nullopt_t) noexcept; template constexpr bool operator>(nullopt_t, const optional&) noexcept; + template constexpr bool operator<=(const optional&, nullopt_t) noexcept; + template constexpr bool operator<=(nullopt_t, const optional&) noexcept; template constexpr bool operator>=(const optional&, nullopt_t) noexcept; template constexpr bool operator>=(nullopt_t, const optional&) noexcept; @@ -2155,10 +2155,10 @@ template constexpr bool operator!=(const T&, const optional&); template constexpr bool operator<(const optional&, const U&); template constexpr bool operator<(const T&, const optional&); - template constexpr bool operator<=(const optional&, const U&); - template constexpr bool operator<=(const T&, const optional&); template constexpr bool operator>(const optional&, const U&); template constexpr bool operator>(const T&, const optional&); + template constexpr bool operator<=(const optional&, const U&); + template constexpr bool operator<=(const T&, const optional&); template constexpr bool operator>=(const optional&, const U&); template constexpr bool operator>=(const T&, const optional&); @@ -3329,48 +3329,48 @@ \tcode{bool(x)}. \end{itemdescr} -\indexlibrarymember{operator<=}{optional}% +\indexlibrarymember{operator>}{optional}% \begin{itemdecl} -template constexpr bool operator<=(const optional& x, nullopt_t) noexcept; +template constexpr bool operator>(const optional& x, nullopt_t) noexcept; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{!x}. +\tcode{bool(x)}. \end{itemdescr} -\indexlibrarymember{operator<=}{optional}% +\indexlibrarymember{operator>}{optional}% \begin{itemdecl} -template constexpr bool operator<=(nullopt_t, const optional& x) noexcept; +template constexpr bool operator>(nullopt_t, const optional& x) noexcept; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{true}. +\tcode{false}. \end{itemdescr} -\indexlibrarymember{operator>}{optional}% +\indexlibrarymember{operator<=}{optional}% \begin{itemdecl} -template constexpr bool operator>(const optional& x, nullopt_t) noexcept; +template constexpr bool operator<=(const optional& x, nullopt_t) noexcept; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{bool(x)}. +\tcode{!x}. \end{itemdescr} -\indexlibrarymember{operator>}{optional}% +\indexlibrarymember{operator<=}{optional}% \begin{itemdecl} -template constexpr bool operator>(nullopt_t, const optional& x) noexcept; +template constexpr bool operator<=(nullopt_t, const optional& x) noexcept; \end{itemdecl} \begin{itemdescr} \pnum \returns -\tcode{false}. +\tcode{true}. \end{itemdescr} \indexlibrarymember{operator>=}{optional}% @@ -3496,68 +3496,68 @@ Equivalent to: \tcode{return bool(x) ?\ v < *x :\ false;} \end{itemdescr} -\indexlibrarymember{operator<=}{optional}% +\indexlibrarymember{operator>}{optional}% \begin{itemdecl} -template constexpr bool operator<=(const optional& x, const U& v); +template constexpr bool operator>(const optional& x, const U& v); \end{itemdecl} \begin{itemdescr} \pnum \requires -The expression \tcode{*x <= v} shall be well-formed and +The expression \tcode{*x > v} shall be well-formed and its result shall be convertible to \tcode{bool}. \pnum \effects -Equivalent to: \tcode{return bool(x) ?\ *x <= v :\ true;} +Equivalent to: \tcode{return bool(x) ?\ *x > v :\ false;} \end{itemdescr} -\indexlibrarymember{operator<=}{optional}% +\indexlibrarymember{operator>}{optional}% \begin{itemdecl} -template constexpr bool operator<=(const T& v, const optional& x); +template constexpr bool operator>(const T& v, const optional& x); \end{itemdecl} \begin{itemdescr} \pnum \requires -The expression \tcode{v <= *x} shall be well-formed and +The expression \tcode{v > *x} shall be well-formed and its result shall be convertible to \tcode{bool}. \pnum \effects -Equivalent to: \tcode{return bool(x) ?\ v <= *x :\ false;} +Equivalent to: \tcode{return bool(x) ?\ v > *x :\ true;} \end{itemdescr} -\indexlibrarymember{operator>}{optional}% +\indexlibrarymember{operator<=}{optional}% \begin{itemdecl} -template constexpr bool operator>(const optional& x, const U& v); +template constexpr bool operator<=(const optional& x, const U& v); \end{itemdecl} \begin{itemdescr} \pnum \requires -The expression \tcode{*x > v} shall be well-formed and +The expression \tcode{*x <= v} shall be well-formed and its result shall be convertible to \tcode{bool}. \pnum \effects -Equivalent to: \tcode{return bool(x) ?\ *x > v :\ false;} +Equivalent to: \tcode{return bool(x) ?\ *x <= v :\ true;} \end{itemdescr} -\indexlibrarymember{operator>}{optional}% +\indexlibrarymember{operator<=}{optional}% \begin{itemdecl} -template constexpr bool operator>(const T& v, const optional& x); +template constexpr bool operator<=(const T& v, const optional& x); \end{itemdecl} \begin{itemdescr} \pnum \requires -The expression \tcode{v > *x} shall be well-formed and +The expression \tcode{v <= *x} shall be well-formed and its result shall be convertible to \tcode{bool}. \pnum \effects -Equivalent to: \tcode{return bool(x) ?\ v > *x :\ true;} +Equivalent to: \tcode{return bool(x) ?\ v <= *x :\ false;} \end{itemdescr} \indexlibrarymember{operator>=}{optional}% @@ -3763,12 +3763,12 @@ struct monostate; // \ref{variant.monostate.relops}, \tcode{monostate} relational operators + constexpr bool operator==(monostate, monostate) noexcept; + constexpr bool operator!=(monostate, monostate) noexcept; constexpr bool operator<(monostate, monostate) noexcept; constexpr bool operator>(monostate, monostate) noexcept; constexpr bool operator<=(monostate, monostate) noexcept; constexpr bool operator>=(monostate, monostate) noexcept; - constexpr bool operator==(monostate, monostate) noexcept; - constexpr bool operator!=(monostate, monostate) noexcept; // \ref{variant.specalg}, specialized algorithms template @@ -4885,19 +4885,19 @@ \rSec2[variant.monostate.relops]{\tcode{monostate} relational operators} +\indexlibrary{\idxcode{operator==}!\idxcode{monostate}}% +\indexlibrary{\idxcode{operator"!=}!\idxcode{monostate}}% \indexlibrary{\idxcode{operator<}!\idxcode{monostate}}% \indexlibrary{\idxcode{operator>}!\idxcode{monostate}}% \indexlibrary{\idxcode{operator<=}!\idxcode{monostate}}% \indexlibrary{\idxcode{operator>=}!\idxcode{monostate}}% -\indexlibrary{\idxcode{operator==}!\idxcode{monostate}}% -\indexlibrary{\idxcode{operator"!=}!\idxcode{monostate}}% \begin{itemdecl} +constexpr bool operator==(monostate, monostate) noexcept { return true; } +constexpr bool operator!=(monostate, monostate) noexcept { return false; } constexpr bool operator<(monostate, monostate) noexcept { return false; } constexpr bool operator>(monostate, monostate) noexcept { return false; } constexpr bool operator<=(monostate, monostate) noexcept { return true; } constexpr bool operator>=(monostate, monostate) noexcept { return true; } -constexpr bool operator==(monostate, monostate) noexcept { return true; } -constexpr bool operator!=(monostate, monostate) noexcept { return false; } \end{itemdecl} \begin{itemdescr} @@ -6632,10 +6632,10 @@ bool operator!=(const unique_ptr& x, const unique_ptr& y); template bool operator<(const unique_ptr& x, const unique_ptr& y); - template - bool operator<=(const unique_ptr& x, const unique_ptr& y); template bool operator>(const unique_ptr& x, const unique_ptr& y); + template + bool operator<=(const unique_ptr& x, const unique_ptr& y); template bool operator>=(const unique_ptr& x, const unique_ptr& y); @@ -6651,14 +6651,14 @@ bool operator<(const unique_ptr& x, nullptr_t); template bool operator<(nullptr_t, const unique_ptr& y); - template - bool operator<=(const unique_ptr& x, nullptr_t); - template - bool operator<=(nullptr_t, const unique_ptr& y); template bool operator>(const unique_ptr& x, nullptr_t); template bool operator>(nullptr_t, const unique_ptr& y); + template + bool operator<=(const unique_ptr& x, nullptr_t); + template + bool operator<=(nullptr_t, const unique_ptr& y); template bool operator>=(const unique_ptr& x, nullptr_t); template @@ -6726,14 +6726,14 @@ bool operator<(const shared_ptr& x, nullptr_t) noexcept; template bool operator<(nullptr_t, const shared_ptr& y) noexcept; - template - bool operator<=(const shared_ptr& x, nullptr_t) noexcept; - template - bool operator<=(nullptr_t, const shared_ptr& y) noexcept; template bool operator>(const shared_ptr& x, nullptr_t) noexcept; template bool operator>(nullptr_t, const shared_ptr& y) noexcept; + template + bool operator<=(const shared_ptr& x, nullptr_t) noexcept; + template + bool operator<=(nullptr_t, const shared_ptr& y) noexcept; template bool operator>=(const shared_ptr& x, nullptr_t) noexcept; template @@ -8891,26 +8891,26 @@ convertible to \tcode{CT}, the program is ill-formed. \end{itemdescr} -\indexlibrarymember{operator<=}{unique_ptr}% +\indexlibrarymember{operator>}{unique_ptr}% \begin{itemdecl} template - bool operator<=(const unique_ptr& x, const unique_ptr& y); + bool operator>(const unique_ptr& x, const unique_ptr& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(y < x)}. +\returns \tcode{y < x}. \end{itemdescr} -\indexlibrarymember{operator>}{unique_ptr}% +\indexlibrarymember{operator<=}{unique_ptr}% \begin{itemdecl} template - bool operator>(const unique_ptr& x, const unique_ptr& y); + bool operator<=(const unique_ptr& x, const unique_ptr& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{y < x}. +\returns \tcode{!(y < x)}. \end{itemdescr} \indexlibrarymember{operator>=}{unique_ptr}% @@ -16019,7 +16019,7 @@ for a \cv{}~\tcode{void} type \tcode{T}, \tcode{is_constructible_v} is \tcode{false}, otherwise \seebelow & - \tcode{T} and all types in the parameter pack \tcode{Args} + \tcode{T} and all types in the template parameter pack \tcode{Args} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound. \\ \rowsep @@ -16133,7 +16133,7 @@ \tcode{Args...>} is \tcode{true} and the variable definition for \tcode{is_constructible}, as defined below, is known to call no operation that is not trivial~(\ref{basic.types}, \ref{special}). & - \tcode{T} and all types in the parameter pack \tcode{Args} shall be complete types, + \tcode{T} and all types in the template parameter pack \tcode{Args} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound. \\ \rowsep \indexlibrary{\idxcode{is_trivially_default_constructible}}% @@ -16206,7 +16206,7 @@ variable definition for \tcode{is_constructible}, as defined below, is known not to throw any exceptions\iref{expr.unary.noexcept}. & - \tcode{T} and all types in the parameter pack \tcode{Args} + \tcode{T} and all types in the template parameter pack \tcode{Args} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound. \\ \rowsep @@ -16505,7 +16505,7 @@ \tcode{struct is_invocable;} & The expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)} is well-formed when treated as an unevaluated operand & - \tcode{Fn} and all types in the parameter pack \tcode{ArgTypes} + \tcode{Fn} and all types in the template parameter pack \tcode{ArgTypes} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound. \\ \rowsep @@ -16514,7 +16514,7 @@ \tcode{struct is_invocable_r;} & The expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)} is well-formed when treated as an unevaluated operand & - \tcode{Fn}, \tcode{R}, and all types in the parameter pack \tcode{ArgTypes} + \tcode{Fn}, \tcode{R}, and all types in the template parameter pack \tcode{ArgTypes} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound. \\ \rowsep @@ -16524,7 +16524,7 @@ \tcode{is_invocable_v<}\br\tcode{Fn, ArgTypes...>} is \tcode{true} and the expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)} is known not to throw any exceptions & - \tcode{Fn} and all types in the parameter pack \tcode{ArgTypes} + \tcode{Fn} and all types in the template parameter pack \tcode{ArgTypes} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound. \\ \rowsep @@ -16534,7 +16534,7 @@ \tcode{is_invocable_r_v<}\br\tcode{R, Fn, ArgTypes...>} is \tcode{true} and the expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)} is known not to throw any exceptions & - \tcode{Fn}, \tcode{R}, and all types in the parameter pack \tcode{ArgTypes} + \tcode{Fn}, \tcode{R}, and all types in the template parameter pack \tcode{ArgTypes} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound. \\ \end{libreqtab3f} @@ -16861,7 +16861,7 @@ shall be an integral constant of type \tcode{size_t} whose value is the strictest alignment of all types listed in \tcode{Types}.\br \requires{} At least one type is provided. - Each type in the parameter pack \tcode{Types} shall be a complete object type. + Each type in the template parameter pack \tcode{Types} shall be a complete object type. \\ \rowsep \indexlibrary{\idxcode{remove_cvref}}% @@ -16905,7 +16905,7 @@ Unless this trait is specialized (as specified in Note B, below), the member \tcode{type} shall be defined or omitted as specified in Note A, below. If it is omitted, there shall be no member \tcode{type}. - Each type in the parameter pack \tcode{T} shall be + Each type in the template parameter pack \tcode{T} shall be complete, \cv{}~\tcode{void}, or an array of unknown bound. \\ \rowsep \indexlibrary{\idxcode{underlying_type}}% @@ -16935,7 +16935,7 @@ functions, and so on. Such side effects are not in the ``immediate context'' and can result in the program being ill-formed. \end{note} \br - \requires{} \tcode{Fn} and all types in the parameter pack \tcode{ArgTypes} shall + \requires{} \tcode{Fn} and all types in the template parameter pack \tcode{ArgTypes} shall be complete types, \cv{}~\tcode{void}, or arrays of unknown bound.\\ \end{libreqtab2a} @@ -16961,7 +16961,7 @@ \indexlibrary{\idxcode{common_type}}% \pnum Note A: -For the \tcode{common_type} trait applied to a parameter pack \tcode{T} of types, +For the \tcode{common_type} trait applied to a template parameter pack \tcode{T} of types, the member \tcode{type} shall be either defined or not present as follows: \begin{itemize} @@ -17545,10 +17545,10 @@ constexpr bool operator< (const duration& lhs, const duration& rhs); template - constexpr bool operator<=(const duration& lhs, + constexpr bool operator> (const duration& lhs, const duration& rhs); template - constexpr bool operator> (const duration& lhs, + constexpr bool operator<=(const duration& lhs, const duration& rhs); template constexpr bool operator>=(const duration& lhs, @@ -17622,10 +17622,10 @@ constexpr bool operator< (const time_point& lhs, const time_point& rhs); template - constexpr bool operator<=(const time_point& lhs, + constexpr bool operator> (const time_point& lhs, const time_point& rhs); template - constexpr bool operator> (const time_point& lhs, + constexpr bool operator<=(const time_point& lhs, const time_point& rhs); template constexpr bool operator>=(const time_point& lhs, @@ -18288,7 +18288,7 @@ bool operator==(const zoned_time& x, const zoned_time& y); - template + template bool operator!=(const zoned_time& x, const zoned_time& y); @@ -18410,9 +18410,6 @@ inline namespace literals { inline namespace chrono_literals { // \ref{time.duration.literals}, suffixes for duration literals - constexpr chrono::year operator""y(unsigned long long y) noexcept; - constexpr chrono::day operator""d(unsigned long long d) noexcept; - constexpr chrono::hours operator""h(unsigned long long); constexpr chrono::duration<@\unspec,@ ratio<3600, 1>> operator""h(long double); @@ -18430,6 +18427,12 @@ constexpr chrono::nanoseconds operator""ns(unsigned long long); constexpr chrono::duration<@\unspec,@ nano> operator""ns(long double); + + // \ref{time.cal.day.nonmembers}, non-member functions + constexpr chrono::day operator""d(unsigned long long d) noexcept; + + // \ref{time.cal.year.nonmembers}, non-member functions + constexpr chrono::year operator""y(unsigned long long y) noexcept; } } @@ -18562,7 +18565,7 @@ \pnum The \tcode{duration} template uses the \tcode{duration_values} trait to -construct special values of the durations representation (\tcode{Rep}). This is +construct special values of the duration's representation (\tcode{Rep}). This is done because the representation might be a class type with behavior which requires some other implementation to return these special values. In that case, the author of that class type should specialize \tcode{duration_values} to @@ -19186,28 +19189,28 @@ \returns \tcode{CT(lhs).count() < CT(rhs).count()}. \end{itemdescr} -\indexlibrarymember{operator<=}{duration}% +\indexlibrarymember{operator>}{duration}% \begin{itemdecl} template - constexpr bool operator<=(const duration& lhs, - const duration& rhs); + constexpr bool operator>(const duration& lhs, + const duration& rhs); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(rhs < lhs)}. +\returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{operator>}{duration}% +\indexlibrarymember{operator<=}{duration}% \begin{itemdecl} template - constexpr bool operator>(const duration& lhs, - const duration& rhs); + constexpr bool operator<=(const duration& lhs, + const duration& rhs); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{rhs < lhs}. +\returns \tcode{!(rhs < lhs)}. \end{itemdescr} \indexlibrarymember{operator>=}{duration}% @@ -19859,28 +19862,28 @@ \returns \tcode{lhs.time_since_epoch() < rhs.time_since_epoch()}. \end{itemdescr} -\indexlibrarymember{operator<=}{time_point}% +\indexlibrarymember{operator>}{time_point}% \begin{itemdecl} template - constexpr bool operator<=(const time_point& lhs, - const time_point& rhs); + constexpr bool operator>(const time_point& lhs, + const time_point& rhs); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!(rhs < lhs)}. +\returns \tcode{rhs < lhs}. \end{itemdescr} -\indexlibrarymember{operator>}{time_point}% +\indexlibrarymember{operator<=}{time_point}% \begin{itemdecl} template - constexpr bool operator>(const time_point& lhs, - const time_point& rhs); + constexpr bool operator<=(const time_point& lhs, + const time_point& rhs); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{rhs < lhs}. +\returns \tcode{!(rhs < lhs)}. \end{itemdescr} \indexlibrarymember{operator>=}{time_point}% @@ -26037,7 +26040,7 @@ for (hours h : {1h, 18h}) { time_of_day tod(h); os << tod << '\n'; - tod.make12() + tod.make12(); os << tod << '\n'; } \end{codeblock} @@ -26078,7 +26081,7 @@ for (minutes m : {68min, 1095min}) { time_of_day tod(m); os << tod << '\n'; - tod.make12() + tod.make12(); os << tod << '\n'; } \end{codeblock} @@ -26119,7 +26122,7 @@ for (seconds s : {4083s, 65745s}) { time_of_day tod(s); os << tod << '\n'; - tod.make12() + tod.make12(); os << tod << '\n'; } \end{codeblock} @@ -26160,7 +26163,7 @@ for (milliseconds ms : {4083007ms, 65745123ms}) { time_of_day tod(ms); os << tod << '\n'; - tod.make12() + tod.make12(); os << tod << '\n'; } \end{codeblock} @@ -27067,7 +27070,7 @@ explicit zoned_time(string_view name); template - zoned_time(const zoned_time& zt) noexcept; + zoned_time(const zoned_time& zt) noexcept; zoned_time(TimeZonePtr z, const sys_time& st); zoned_time(string_view name, const sys_time& st); @@ -27212,7 +27215,7 @@ \end{itemdescr} \begin{itemdecl} -template +template zoned_time(const zoned_time& y) noexcept; \end{itemdecl} @@ -27269,7 +27272,7 @@ \remarks This constructor does not participate in overload resolution unless \begin{codeblock} -declval()->to_sys(local_time{}) +decltype(declval()->to_sys(local_time{})) \end{codeblock} is convertible to \tcode{sys_time}. @@ -27333,7 +27336,7 @@ \end{itemdescr} \begin{itemdecl} -template +template zoned_time(TimeZonePtr z, const zoned_time& y); \end{itemdecl} @@ -27352,7 +27355,7 @@ \end{itemdescr} \begin{itemdecl} -template +template zoned_time(TimeZonePtr z, const zoned_time& y, choose); \end{itemdecl} @@ -27518,12 +27521,24 @@ \returns \tcode{x.zone_ == y.zone_ \&\& x.tp_ == y.tp_}. \end{itemdescr} +\indexlibrarymember{operator"!=}{zoned_time}% +\begin{itemdecl} +template + bool operator!=(const zoned_time& x, + const zoned_time& y); +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns \tcode{!(x == y)}. +\end{itemdescr} + \indexlibrarymember{operator<<}{zoned_time}% \begin{itemdecl} template basic_ostream& operator<<(basic_ostream& os, - const zoned_time& t) + const zoned_time& t); \end{itemdecl} \begin{itemdescr} @@ -27626,7 +27641,7 @@ \indexlibrarymember{date}{leap}% \begin{itemdecl} -constexpr sys_seconds date() const noexcept +constexpr sys_seconds date() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -27638,7 +27653,7 @@ \indexlibrarymember{operator==}{leap}% \begin{itemdecl} -constexpr bool operator==(const leap& x, const leap& y) noexcept +constexpr bool operator==(const leap& x, const leap& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27648,7 +27663,7 @@ \indexlibrarymember{operator<}{leap}% \begin{itemdecl} -constexpr bool operator<(const leap& x, const leap& y) noexcept +constexpr bool operator<(const leap& x, const leap& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27660,7 +27675,7 @@ \indexlibrarymember{operator==}{sys_time}% \begin{itemdecl} template - constexpr bool operator==(const leap& x, const sys_time& y) noexcept + constexpr bool operator==(const leap& x, const sys_time& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27672,7 +27687,7 @@ \indexlibrarymember{operator==}{sys_time}% \begin{itemdecl} template - constexpr bool operator==(const sys_time& x, const leap& y) noexcept + constexpr bool operator==(const sys_time& x, const leap& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27684,7 +27699,7 @@ \indexlibrarymember{operator"!=}{sys_time}% \begin{itemdecl} template - constexpr bool operator!=(const leap& x, const sys_time& y) noexcept + constexpr bool operator!=(const leap& x, const sys_time& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27696,7 +27711,7 @@ \indexlibrarymember{operator"!=}{sys_time}% \begin{itemdecl} template - constexpr bool operator!=(const sys_time& x, const leap& y) noexcept + constexpr bool operator!=(const sys_time& x, const leap& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27708,7 +27723,7 @@ \indexlibrarymember{operator<}{sys_time}% \begin{itemdecl} template - constexpr bool operator<(const leap& x, const sys_time& y) noexcept + constexpr bool operator<(const leap& x, const sys_time& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27720,7 +27735,7 @@ \indexlibrarymember{operator<}{sys_time}% \begin{itemdecl} template - constexpr bool operator<(const sys_time& x, const leap& y) noexcept + constexpr bool operator<(const sys_time& x, const leap& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27732,7 +27747,7 @@ \indexlibrarymember{operator>}{sys_time}% \begin{itemdecl} template - constexpr bool operator>(const leap& x, const sys_time& y) noexcept + constexpr bool operator>(const leap& x, const sys_time& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27744,7 +27759,7 @@ \indexlibrarymember{operator>}{sys_time}% \begin{itemdecl} template - constexpr bool operator>(const sys_time& x, const leap& y) noexcept + constexpr bool operator>(const sys_time& x, const leap& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27756,7 +27771,7 @@ \indexlibrarymember{operator<=}{sys_time}% \begin{itemdecl} template - constexpr bool operator<=(const leap& x, const sys_time& y) noexcept + constexpr bool operator<=(const leap& x, const sys_time& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27768,7 +27783,7 @@ \indexlibrarymember{operator<=}{sys_time}% \begin{itemdecl} template - constexpr bool operator<=(const sys_time& x, const leap& y) noexcept + constexpr bool operator<=(const sys_time& x, const leap& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27780,7 +27795,7 @@ \indexlibrarymember{operator>=}{sys_time}% \begin{itemdecl} template - constexpr bool operator>=(const leap& x, const sys_time& y) noexcept + constexpr bool operator>=(const leap& x, const sys_time& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27792,7 +27807,7 @@ \indexlibrarymember{operator>=}{sys_time}% \begin{itemdecl} template - constexpr bool operator>=(const sys_time& x, const leap& y) noexcept + constexpr bool operator>=(const sys_time& x, const leap& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27828,7 +27843,7 @@ \indexlibrarymember{name}{link}% \begin{itemdecl} -string_view name() const noexcept +string_view name() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -27839,7 +27854,7 @@ \indexlibrarymember{target}{link}% \begin{itemdecl} -string_view target() const noexcept +string_view target() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -27853,7 +27868,7 @@ \indexlibrarymember{operator==}{link}% \begin{itemdecl} -bool operator==(const link& x, const link& y) noexcept +bool operator==(const link& x, const link& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -27863,7 +27878,7 @@ \indexlibrarymember{operator<}{link}% \begin{itemdecl} -bool operator<(const link& x, const link& y) noexcept +bool operator<(const link& x, const link& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -28704,8 +28719,8 @@ bool operator==(const type_index& rhs) const noexcept; bool operator!=(const type_index& rhs) const noexcept; bool operator< (const type_index& rhs) const noexcept; - bool operator<= (const type_index& rhs) const noexcept; bool operator> (const type_index& rhs) const noexcept; + bool operator<= (const type_index& rhs) const noexcept; bool operator>= (const type_index& rhs) const noexcept; size_t hash_code() const noexcept; const char* name() const noexcept; @@ -28767,24 +28782,24 @@ \returns \tcode{target->before(*rhs.target)}. \end{itemdescr} -\indexlibrarymember{operator<=}{type_index}% +\indexlibrarymember{operator>}{type_index}% \begin{itemdecl} -bool operator<=(const type_index& rhs) const noexcept; +bool operator>(const type_index& rhs) const noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{!rhs.target->before(*target)}. +\returns \tcode{rhs.target->before(*target)}. \end{itemdescr} -\indexlibrarymember{operator>}{type_index}% +\indexlibrarymember{operator<=}{type_index}% \begin{itemdecl} -bool operator>(const type_index& rhs) const noexcept; +bool operator<=(const type_index& rhs) const noexcept; \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{rhs.target->before(*target)}. +\returns \tcode{!rhs.target->before(*target)}. \end{itemdescr} \indexlibrarymember{operator>=}{type_index}%