diff --git a/.travis.yml b/.travis.yml index 2c99e00e4f..59d220bed8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,6 +60,7 @@ addons: - texlive-latex-base - texlive-latex-extra - texlive-latex-recommended + - texlive-generic-recommended - texlive-binaries - graphviz - lmodern diff --git a/papers/n4700.pdf b/papers/n4700.pdf new file mode 100644 index 0000000000..9062905f62 Binary files /dev/null and b/papers/n4700.pdf differ diff --git a/papers/n4701.html b/papers/n4701.html new file mode 100644 index 0000000000..543315a383 --- /dev/null +++ b/papers/n4701.html @@ -0,0 +1,552 @@ +N4701 +

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

+ +

2017-10-16
+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, +Jonathan Wakely, +and Eelis van der Weegen +for performing many of the editorial fixes since N4687.

+ +

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 N4687.

+ +

Notable editorial changes

+ +

Changes in the style of specification

+ + + +

Drafting for future standard changes should take the above into account.

+ +

Lists of figures and tables

+ +

At the request of ISO, the lists of figures and tables have been removed from +the document.

+ +

Pagination

+ +

At the request of ISO, the paper size used for the working draft has been +switched to A4.

+ +

Courtesy of Jens Maurer, we now automatically attempt to avoid page breaks +in undesirable places: immediately after section headings, and between the +declaration and description of standard library elements. We also provide +page break hints at the end of declarations and on blank lines in code blocks. +Many thanks to Jens; this will substantially reduce the effort required to +finalize the C++20 IS. Please file an file an editorial +issues +if you find any bad page breaks in the working draft.

+ +

Filesystem Terms and Definitions

+ +

Per the ISO Directives, the filesystem wording is not entitled to its own +Terms and Definitions section. The corresponding terms have been converted +to use our normal style of an italicized definition, the definitions have +been incorporated into the relevant portion of the running text, and the +[fs.definitions] subclause has been removed.

+ +

Minor editorial fixes

+ +

A log of editorial fixes made to the working draft since N4687 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 e3a5f29e3dbd60089a6371e5f16d5d507c429ea3
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Oct 16 16:19:56 2017 -0700
+
+    [util.smartptr.shared.cmp] Fix overfull hbox.
+    [unique.ptr.special] Adjust to match changes to [util.smartptr.shared.cmp]
+    [tuple.cnstr] Adjust wording to avoid awkward linebreak within code
+    fragment.
+
+commit d1ba29b57990161cbbcdbb3faf60aa9b67cc3274
+Author: Akira Takahashi <faithandbrave@gmail.com>
+Date:   Tue Oct 17 01:29:14 2017 +0900
+
+    [util.smartptr.shared.cmp] Add "typename" for dependent name (#1770)
+
+commit dbb1ea97f1cb57cab275ba4eec9def4b3daab97e
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Mon Oct 16 16:20:06 2017 +0200
+
+    [unord.map.overview], [unord.multimap.overview] Use iter_val_t instead of iter_value_t (#1772)
+
+commit b07fd6c53e0d5841b513192ebe08c047f3d05df4
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Thu Apr 20 21:41:52 2017 +0200
+
+    Use 'well-formed' (with hyphen) consistently.
+
+    Fixes #1618.
+
+commit af40423574aa8e3a495b382840a258f94cb6349d
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Mon Jul 10 18:23:47 2017 +0100
+
+    [stringbuf.virtuals] Rephrase DR 453 resolution for seekoff
+
+    This avoids the requirement to compare newoff to zero when the value of
+    newoff hasn't been determined.
+
+commit d6a3234838da05d460366c83d8ec524f42ea37a4
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 6 22:29:52 2017 +0200
+
+    [thread.condition.condvarany] Remove note made incorrect by LWG 2135.
+
+    Fixes #1755.
+
+commit dead61f32a2ed040745b668640924520d7b64c71
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Fri Oct 13 20:28:20 2017 +0100
+
+    [fs.filesystem.syn] fix ordering of exists and equivalent
+
+commit ac3ed314239fccf81cece3cf7aeabdced03e5032
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 13 23:30:00 2017 +0200
+
+    [class.virtual] Correct function names in example comments.
+
+    Fixes #1740.
+
+commit 0059794f5370697d647bf31cc434cf306ba08554
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Tue Oct 10 12:23:17 2017 -0700
+
+    Front matter: remove "Contents" entry from itself. Remove list of tables
+    and list of figures. Reorder cross-reference bullets in "Terms and
+    definitions".
+
+    As requested by ISO Central Secretariat.
+
+commit 8b767974c25346ea4d8990ebe315ab8dfa45a3b9
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 6 21:52:12 2017 +0200
+
+    [mem.res.private] Remove misleading 'typical' in note.
+
+    Fixes #1698.
+
+commit 4a5ff4e7f947da6130a25900443317c18e879acf
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Oct 3 13:41:04 2017 +0100
+
+    [time] Fix namespace for definitions in std::chrono
+
+    The previous commit ad767d39f1a0667470ded0e5eb3155fcdd55f465 accidentally added the wrong namespace "std" instead of "std::chrono".
+
+commit 72647e7b03472315794872a10dfe2f2b74a2fa74
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Oct 3 10:22:55 2017 +0100
+
+    [mem.res] Fix namespace for definitions in std::pmr
+
+    The previous commit ad767d39f1a0667470ded0e5eb3155fcdd55f465 accidentally added the wrong namespace "std" instead of "std::pmr".
+
+commit eb035cf60c50ef8ad7d74ffdd5c2140f4179769a
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Oct 3 01:01:53 2017 +0100
+
+    [memory.syn, unique.ptr] Add explanatory comments to make_unique overloads similar to the ones for make_shared, and mild presentational cleanup
+
+commit ad767d39f1a0667470ded0e5eb3155fcdd55f465
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Oct 3 00:18:23 2017 +0100
+
+    [utilities] Add missing "namespace std" to some class definitions
+
+commit b888c3d0cbe078475562f2b4d5f45e1528e61c6e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Oct 3 00:08:23 2017 +0100
+
+    [containers] Remove repeated statement of relational operator declarations (#1759)
+
+commit 1c43bc8685335048cd30042a712c0b40ff7f890a
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Mon Oct 2 22:55:20 2017 +0100
+
+    [unique.ptr, util.smartptr.shared] Remove redundant repetitions of declarations that already appear in the synopsis (#1758)
+
+commit 6d9e8c6237230c1c09d7f265751caf8cd5a1e2dc
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 25 15:58:53 2017 -0700
+
+    [dcl.type.simple] Improve naming of template specialization in example.
+
+commit 97f21603bd6a9a547b98394a85c1cc0f342f7273
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 25 15:45:43 2017 -0700
+
+    Fix '// Error' in examples to use '// error' instead.
+
+commit fa958265bed2a99d6d9787705297dc34c749017a
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Mon Sep 25 23:45:52 2017 +0100
+
+    [thread.req.timing] Use mathematical symbols
+
+commit 10c90ef815f10a800a3119476dc637c288c7c312
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Mon Sep 25 23:31:58 2017 +0100
+
+    [thread] Harmonize presentation of synopses and declarations
+
+commit 9680eb724be8802b9823b234f0f5cad88a2efde9
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 25 11:49:13 2017 -0700
+
+    [ios.members.static] Fix case of first letter in footnotes.
+
+commit 6a7b14ae0b0f74f3ee27f0ad1354920acc830558
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 25 09:32:47 2017 -0700
+
+    [string.assign] Add missing "Returns:".
+
+commit 9177b4b733b7fe8d121647d5638040c1d059370e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Mon Sep 18 13:44:55 2017 +0100
+
+    [allocator.requirements] Fix footnote within Table 31 and table placement
+
+commit b6268620ee5cf87e4416f58e8f37995618b6495c
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Aug 15 13:34:46 2017 +0100
+
+    [futures.async] remove parens from DECAY_COPY()
+
+commit 64c8b273fb401b845a851fc0361766943959d6d7
+Author: timsong-cpp <rs2740@gmail.com>
+Date:   Sat Aug 12 01:03:02 2017 -0400
+
+    [diff.cpp14.library] Add Annex C entry for new headers in C++17
+
+    Fixes #1700.
+
+commit 1a9b8ebecd1c4e2da29329be5d7bda696c8cfbed
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Tue Sep 12 11:53:46 2017 -0700
+
+    Convert "must"s in normative wording that do not indicate logical
+    necessity to a different form.
+
+    Normative requirements use "shall". Advice to users uses "should".
+    Description of the behavior of the implementation that does not of
+    itself constitute a requirement uses the imperative mood.
+
+    Fixes ISO 21 (C++17 DIS)
+
+commit 6218c216178655ece30733a0ec8043af9a65bf2e
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Thu Sep 14 14:45:56 2017 -0700
+
+    Replace "this International Standard" with "this document" when
+    referring to the document as a body of text.
+
+    Cases where that phrasing is used to compare this standard to other
+    revisions of the C++ standard retain this phrasing for clarity.
+
+    Fixes ISO 20 (C++17 DIS)
+
+commit 132326619d234a2b62819fd3a2cba6d9c654be23
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Thu Sep 14 14:00:40 2017 -0700
+
+    [support.start.term] Remove note that is not justified by normative
+    wording.
+
+    Fixes NB JP 7 (C++17 DIS)
+
+commit 577968dc4de4674333510aea1d0e7da38c9e3bb6
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 11 16:51:59 2017 -0700
+
+    [temp.over.link] Change leading letter in comments in example to lowercase.
+
+    Fixes NB JP 6 (C++17 DIS)
+
+commit 081894151eb9b8f628168af9fffc38b0cbd0f6cf
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 11 16:45:15 2017 -0700
+
+    [over.match.funcs] Remove the number of overload resolution contexts
+    from the introductory text.
+
+    It has become out of date relative to the actual number, and listing a
+    number here is not useful.
+
+    Fixes NB JP 5 (C++17 DIS)
+
+commit 6b0c8352738bce937d5aa633aacb4cd3c3285acc
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Thu Sep 7 21:58:28 2017 +0100
+
+    [intro.defs, definitions, fs.definitions] change notes in Terms and Definitions to say "Note X to entry"
+
+    Fixes ISO 3 (C++17 DIS)
+
+commit fa49082e030985ebdf3ecc91ece5cbdf72421338
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 11 16:30:12 2017 -0700
+
+    [fs] Integrate file system terms and definitions into the text at appropriate places.
+
+    Update xrefs to point to the relevant definitions.
+
+    Update index entries for constraint normalization to harmonize with
+    those for path normalization.
+
+commit 60453da3081d8fa5753f48d2c78e1e78b1a3b079
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 11 11:40:41 2017 -0700
+
+    [fs.definitions] Replace "Terms and definitions" formatting with inline definitions.
+
+    These definitions do not satisfy ISO rules for a "Terms and definitions"
+    section, and in any case it does not make sense for FS to have its own
+    "Terms and definitions". Following our usual convention, we use inline
+    definitions for locally-scoped terms.
+
+commit 5619b65614eae10510f337a1eacd05fc4308fe5c
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Thu Sep 7 14:40:23 2017 -0700
+
+    Update [intro.defs] and [definitions] to use (roughly) substitutable
+    phrases as definitions.
+
+    In particular, such phrases should not begin with an article. However,
+    for definitions of adjectives, a noun phrase is still used, because the
+    English language is not compatible with ISO's requirements.
+
+commit a31fa795274e9fbb676b3ef2a8e60df12eb516b0
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Mon Sep 11 16:36:49 2017 -0700
+
+    [intro.refs] Remove redundant reference to C11 Technical Corrigendum 1.
+
+    When making a normative reference to another document, all relevant
+    Technical Corrigenda are assumed and need not be listed explicitly.
+
+    Fixes ISO 1 (C++17 DIS)
+
+commit 1a4e554f910cdd1df3d2d8a62c2270dd1219eddc
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Thu Sep 7 20:02:06 2017 +0100
+
+    [any.cons] fix tag typename; "in_place<T>" should be "in_place_type<T>"
+
+    Fixes NB JP 10 (C++17 DIS)
+
+commit 788b07ba87458c35228ecbdccb2e9dfac37eebf8
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Thu Sep 7 19:18:13 2017 +0100
+
+    [algorithms.parallel.user] remove stray full stop
+
+    Fixes NB JP 12 (C++17 DIS)
+
+commit d0b014a78818c0c1cc4c7b2e96f1264990d06478
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Thu Sep 7 19:09:32 2017 +0100
+
+    [support.general, depr.cpp.headers] remove index entries for now-deprecated headers and symbols, and add missing index entries for deprecated headers.
+
+    Fixes NB JP 23 (C++17 DIS)
+
+commit d9075c89a2539d5b3038c1a15b02673fe18589c3
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Thu Sep 7 11:55:36 2017 +0100
+
+    [alg.reverse] remove duplicated Requires: element
+
+    Fixes NB JP 14 (C++17 DIS)
+
+commit 27331fd3a2c8b3b78223712d56bbd51be1c9159b
+Author: Eelis van der Weegen <eelis@eelis.net>
+Date:   Sat Aug 12 18:14:44 2017 +0200
+
+    Consistently place footnote mark after sentence full stop, not before it.
+
+commit be5c14cf44a6e6ea7348e65dbf99e3a8152c28ac
+Author: Richard Smith <richard@metafoo.co.uk>
+Date:   Wed Aug 9 15:59:11 2017 -0700
+
+    [expr.prim.req.compound] Adjust description in example to be easier to understand.
+
+commit c57ffb959dc939979111a4d1bcc31b71da643511
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Fri Aug 4 18:33:41 2017 +0100
+
+    [temp.deduct] Split long paragraph 8
+
+commit e3b4927ea0f4e8c8bf1f7461226c729b4e2c00be
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Aug 1 22:06:30 2017 +0100
+
+    [memory.syn, util.smartptr.shared] Add missing {make,allocate}_shared declarations to synopsis
+
+    We list those functions in two places: the main synopsis in [memory.syn], and also a smaller subset in [util.smartptr.shared] just for shared_ptr.
+
+    Also contains some minor presentational improvements for both instances.
+
+    Fixes #1697.
+
+commit 355a20beb12ba9c26cb09d41159f7f68238dab7d
+Author: timsong-cpp <rs2740@gmail.com>
+Date:   Tue Aug 1 04:14:14 2017 -0400
+
+    [defns.well.formed] remove full stop
+
diff --git a/papers/n4701.md b/papers/n4701.md new file mode 100644 index 0000000000..327bf41ef6 --- /dev/null +++ b/papers/n4701.md @@ -0,0 +1,424 @@ +# N4701 Editors' Report -- Programming Languages -- C++ + +2017-10-16 +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, +Jonathan Wakely, +and Eelis van der Weegen +for performing many of the editorial fixes since N4687. + +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 + + * [N4700](http://wg21.link/n4700) is the current working draft for C++20. It replaces [N4659](http://wg21.link/n4687). + * N4701 is this Editors' Report. + +## Motions incorporated into working draft + +This revision contains only editorial changes relative to N4687. + +## Notable editorial changes + +### Changes in the style of specification + +* Entries in Terms and Definitions have been reworded to serve as a replacement + for the term they define. +* Care has been taken to replace any use of "must" with "shall" when it states + a requirement rather than a logical necessity. +* The standard now generally refers to itself as "this document", and only in + rare cases as "this International Standard". + +Drafting for future standard changes should take the above into account. + +### Lists of figures and tables + +At the request of ISO, the lists of figures and tables have been removed from +the document. + +### Pagination + +At the request of ISO, the paper size used for the working draft has been +switched to A4. + +Courtesy of Jens Maurer, we now automatically attempt to avoid page breaks +in undesirable places: immediately after section headings, and between the +declaration and description of standard library elements. We also provide +page break hints at the end of declarations and on blank lines in code blocks. +Many thanks to Jens; this will substantially reduce the effort required to +finalize the C++20 IS. Please file an [file an editorial +issues](https://github.com/cplusplus/draft/wiki/How-to-submit-an-editorial-issue) +if you find any bad page breaks in the working draft. + +### Filesystem Terms and Definitions + +Per the ISO Directives, the filesystem wording is not entitled to its own +Terms and Definitions section. The corresponding terms have been converted +to use our normal style of an italicized definition, the definitions have +been incorporated into the relevant portion of the running text, and the +[fs.definitions] subclause has been removed. + +## Minor editorial fixes + +A log of editorial fixes made to the working draft since N4687 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/n4687...n4700). + + commit e3a5f29e3dbd60089a6371e5f16d5d507c429ea3 + Author: Richard Smith + Date: Mon Oct 16 16:19:56 2017 -0700 + + [util.smartptr.shared.cmp] Fix overfull hbox. + [unique.ptr.special] Adjust to match changes to [util.smartptr.shared.cmp] + [tuple.cnstr] Adjust wording to avoid awkward linebreak within code + fragment. + + commit d1ba29b57990161cbbcdbb3faf60aa9b67cc3274 + Author: Akira Takahashi + Date: Tue Oct 17 01:29:14 2017 +0900 + + [util.smartptr.shared.cmp] Add "typename" for dependent name (#1770) + + commit dbb1ea97f1cb57cab275ba4eec9def4b3daab97e + Author: Jens Maurer + Date: Mon Oct 16 16:20:06 2017 +0200 + + [unord.map.overview], [unord.multimap.overview] Use iter_val_t instead of iter_value_t (#1772) + + commit b07fd6c53e0d5841b513192ebe08c047f3d05df4 + Author: Jens Maurer + Date: Thu Apr 20 21:41:52 2017 +0200 + + Use 'well-formed' (with hyphen) consistently. + + Fixes #1618. + + commit af40423574aa8e3a495b382840a258f94cb6349d + Author: Jonathan Wakely + Date: Mon Jul 10 18:23:47 2017 +0100 + + [stringbuf.virtuals] Rephrase DR 453 resolution for seekoff + + This avoids the requirement to compare newoff to zero when the value of + newoff hasn't been determined. + + commit d6a3234838da05d460366c83d8ec524f42ea37a4 + Author: Jens Maurer + Date: Fri Oct 6 22:29:52 2017 +0200 + + [thread.condition.condvarany] Remove note made incorrect by LWG 2135. + + Fixes #1755. + + commit dead61f32a2ed040745b668640924520d7b64c71 + Author: Jonathan Wakely + Date: Fri Oct 13 20:28:20 2017 +0100 + + [fs.filesystem.syn] fix ordering of exists and equivalent + + commit ac3ed314239fccf81cece3cf7aeabdced03e5032 + Author: Jens Maurer + Date: Fri Oct 13 23:30:00 2017 +0200 + + [class.virtual] Correct function names in example comments. + + Fixes #1740. + + commit 0059794f5370697d647bf31cc434cf306ba08554 + Author: Richard Smith + Date: Tue Oct 10 12:23:17 2017 -0700 + + Front matter: remove "Contents" entry from itself. Remove list of tables + and list of figures. Reorder cross-reference bullets in "Terms and + definitions". + + As requested by ISO Central Secretariat. + + commit 8b767974c25346ea4d8990ebe315ab8dfa45a3b9 + Author: Jens Maurer + Date: Fri Oct 6 21:52:12 2017 +0200 + + [mem.res.private] Remove misleading 'typical' in note. + + Fixes #1698. + + commit 4a5ff4e7f947da6130a25900443317c18e879acf + Author: Thomas Köppe + Date: Tue Oct 3 13:41:04 2017 +0100 + + [time] Fix namespace for definitions in std::chrono + + The previous commit ad767d39f1a0667470ded0e5eb3155fcdd55f465 accidentally added the wrong namespace "std" instead of "std::chrono". + + commit 72647e7b03472315794872a10dfe2f2b74a2fa74 + Author: Thomas Köppe + Date: Tue Oct 3 10:22:55 2017 +0100 + + [mem.res] Fix namespace for definitions in std::pmr + + The previous commit ad767d39f1a0667470ded0e5eb3155fcdd55f465 accidentally added the wrong namespace "std" instead of "std::pmr". + + commit eb035cf60c50ef8ad7d74ffdd5c2140f4179769a + Author: Thomas Köppe + Date: Tue Oct 3 01:01:53 2017 +0100 + + [memory.syn, unique.ptr] Add explanatory comments to make_unique overloads similar to the ones for make_shared, and mild presentational cleanup + + commit ad767d39f1a0667470ded0e5eb3155fcdd55f465 + Author: Thomas Köppe + Date: Tue Oct 3 00:18:23 2017 +0100 + + [utilities] Add missing "namespace std" to some class definitions + + commit b888c3d0cbe078475562f2b4d5f45e1528e61c6e + Author: Thomas Köppe + Date: Tue Oct 3 00:08:23 2017 +0100 + + [containers] Remove repeated statement of relational operator declarations (#1759) + + commit 1c43bc8685335048cd30042a712c0b40ff7f890a + Author: Thomas Köppe + Date: Mon Oct 2 22:55:20 2017 +0100 + + [unique.ptr, util.smartptr.shared] Remove redundant repetitions of declarations that already appear in the synopsis (#1758) + + commit 6d9e8c6237230c1c09d7f265751caf8cd5a1e2dc + Author: Richard Smith + Date: Mon Sep 25 15:58:53 2017 -0700 + + [dcl.type.simple] Improve naming of template specialization in example. + + commit 97f21603bd6a9a547b98394a85c1cc0f342f7273 + Author: Richard Smith + Date: Mon Sep 25 15:45:43 2017 -0700 + + Fix '// Error' in examples to use '// error' instead. + + commit fa958265bed2a99d6d9787705297dc34c749017a + Author: Thomas Köppe + Date: Mon Sep 25 23:45:52 2017 +0100 + + [thread.req.timing] Use mathematical symbols + + commit 10c90ef815f10a800a3119476dc637c288c7c312 + Author: Thomas Köppe + Date: Mon Sep 25 23:31:58 2017 +0100 + + [thread] Harmonize presentation of synopses and declarations + + commit 9680eb724be8802b9823b234f0f5cad88a2efde9 + Author: Richard Smith + Date: Mon Sep 25 11:49:13 2017 -0700 + + [ios.members.static] Fix case of first letter in footnotes. + + commit 6a7b14ae0b0f74f3ee27f0ad1354920acc830558 + Author: Richard Smith + Date: Mon Sep 25 09:32:47 2017 -0700 + + [string.assign] Add missing "Returns:". + + commit 9177b4b733b7fe8d121647d5638040c1d059370e + Author: Thomas Köppe + Date: Mon Sep 18 13:44:55 2017 +0100 + + [allocator.requirements] Fix footnote within Table 31 and table placement + + commit b6268620ee5cf87e4416f58e8f37995618b6495c + Author: Jonathan Wakely + Date: Tue Aug 15 13:34:46 2017 +0100 + + [futures.async] remove parens from DECAY_COPY() + + commit 64c8b273fb401b845a851fc0361766943959d6d7 + Author: timsong-cpp + Date: Sat Aug 12 01:03:02 2017 -0400 + + [diff.cpp14.library] Add Annex C entry for new headers in C++17 + + Fixes #1700. + + commit 1a9b8ebecd1c4e2da29329be5d7bda696c8cfbed + Author: Richard Smith + Date: Tue Sep 12 11:53:46 2017 -0700 + + Convert "must"s in normative wording that do not indicate logical + necessity to a different form. + + Normative requirements use "shall". Advice to users uses "should". + Description of the behavior of the implementation that does not of + itself constitute a requirement uses the imperative mood. + + Fixes ISO 21 (C++17 DIS) + + commit 6218c216178655ece30733a0ec8043af9a65bf2e + Author: Richard Smith + Date: Thu Sep 14 14:45:56 2017 -0700 + + Replace "this International Standard" with "this document" when + referring to the document as a body of text. + + Cases where that phrasing is used to compare this standard to other + revisions of the C++ standard retain this phrasing for clarity. + + Fixes ISO 20 (C++17 DIS) + + commit 132326619d234a2b62819fd3a2cba6d9c654be23 + Author: Richard Smith + Date: Thu Sep 14 14:00:40 2017 -0700 + + [support.start.term] Remove note that is not justified by normative + wording. + + Fixes NB JP 7 (C++17 DIS) + + commit 577968dc4de4674333510aea1d0e7da38c9e3bb6 + Author: Richard Smith + Date: Mon Sep 11 16:51:59 2017 -0700 + + [temp.over.link] Change leading letter in comments in example to lowercase. + + Fixes NB JP 6 (C++17 DIS) + + commit 081894151eb9b8f628168af9fffc38b0cbd0f6cf + Author: Richard Smith + Date: Mon Sep 11 16:45:15 2017 -0700 + + [over.match.funcs] Remove the number of overload resolution contexts + from the introductory text. + + It has become out of date relative to the actual number, and listing a + number here is not useful. + + Fixes NB JP 5 (C++17 DIS) + + commit 6b0c8352738bce937d5aa633aacb4cd3c3285acc + Author: Thomas Köppe + Date: Thu Sep 7 21:58:28 2017 +0100 + + [intro.defs, definitions, fs.definitions] change notes in Terms and Definitions to say "Note X to entry" + + Fixes ISO 3 (C++17 DIS) + + commit fa49082e030985ebdf3ecc91ece5cbdf72421338 + Author: Richard Smith + Date: Mon Sep 11 16:30:12 2017 -0700 + + [fs] Integrate file system terms and definitions into the text at appropriate places. + + Update xrefs to point to the relevant definitions. + + Update index entries for constraint normalization to harmonize with + those for path normalization. + + commit 60453da3081d8fa5753f48d2c78e1e78b1a3b079 + Author: Richard Smith + Date: Mon Sep 11 11:40:41 2017 -0700 + + [fs.definitions] Replace "Terms and definitions" formatting with inline definitions. + + These definitions do not satisfy ISO rules for a "Terms and definitions" + section, and in any case it does not make sense for FS to have its own + "Terms and definitions". Following our usual convention, we use inline + definitions for locally-scoped terms. + + commit 5619b65614eae10510f337a1eacd05fc4308fe5c + Author: Richard Smith + Date: Thu Sep 7 14:40:23 2017 -0700 + + Update [intro.defs] and [definitions] to use (roughly) substitutable + phrases as definitions. + + In particular, such phrases should not begin with an article. However, + for definitions of adjectives, a noun phrase is still used, because the + English language is not compatible with ISO's requirements. + + commit a31fa795274e9fbb676b3ef2a8e60df12eb516b0 + Author: Richard Smith + Date: Mon Sep 11 16:36:49 2017 -0700 + + [intro.refs] Remove redundant reference to C11 Technical Corrigendum 1. + + When making a normative reference to another document, all relevant + Technical Corrigenda are assumed and need not be listed explicitly. + + Fixes ISO 1 (C++17 DIS) + + commit 1a4e554f910cdd1df3d2d8a62c2270dd1219eddc + Author: Thomas Köppe + Date: Thu Sep 7 20:02:06 2017 +0100 + + [any.cons] fix tag typename; "in_place" should be "in_place_type" + + Fixes NB JP 10 (C++17 DIS) + + commit 788b07ba87458c35228ecbdccb2e9dfac37eebf8 + Author: Thomas Köppe + Date: Thu Sep 7 19:18:13 2017 +0100 + + [algorithms.parallel.user] remove stray full stop + + Fixes NB JP 12 (C++17 DIS) + + commit d0b014a78818c0c1cc4c7b2e96f1264990d06478 + Author: Thomas Köppe + Date: Thu Sep 7 19:09:32 2017 +0100 + + [support.general, depr.cpp.headers] remove index entries for now-deprecated headers and symbols, and add missing index entries for deprecated headers. + + Fixes NB JP 23 (C++17 DIS) + + commit d9075c89a2539d5b3038c1a15b02673fe18589c3 + Author: Jonathan Wakely + Date: Thu Sep 7 11:55:36 2017 +0100 + + [alg.reverse] remove duplicated Requires: element + + Fixes NB JP 14 (C++17 DIS) + + commit 27331fd3a2c8b3b78223712d56bbd51be1c9159b + Author: Eelis van der Weegen + Date: Sat Aug 12 18:14:44 2017 +0200 + + Consistently place footnote mark after sentence full stop, not before it. + + commit be5c14cf44a6e6ea7348e65dbf99e3a8152c28ac + Author: Richard Smith + Date: Wed Aug 9 15:59:11 2017 -0700 + + [expr.prim.req.compound] Adjust description in example to be easier to understand. + + commit c57ffb959dc939979111a4d1bcc31b71da643511 + Author: Thomas Köppe + Date: Fri Aug 4 18:33:41 2017 +0100 + + [temp.deduct] Split long paragraph 8 + + commit e3b4927ea0f4e8c8bf1f7461226c729b4e2c00be + Author: Thomas Köppe + Date: Tue Aug 1 22:06:30 2017 +0100 + + [memory.syn, util.smartptr.shared] Add missing {make,allocate}_shared declarations to synopsis + + We list those functions in two places: the main synopsis in [memory.syn], and also a smaller subset in [util.smartptr.shared] just for shared_ptr. + + Also contains some minor presentational improvements for both instances. + + Fixes #1697. + + commit 355a20beb12ba9c26cb09d41159f7f68238dab7d + Author: timsong-cpp + Date: Tue Aug 1 04:14:14 2017 -0400 + + [defns.well.formed] remove full stop diff --git a/source/access.tex b/source/access.tex index 0698835c48..d43b9f468e 100644 --- a/source/access.tex +++ b/source/access.tex @@ -314,11 +314,11 @@ \tcode{protected} members of the base class are accessible as \tcode{private} -members of the derived class\footnote{As specified previously in \ref{class.access}, +members of the derived class.\footnote{As specified previously in \ref{class.access}, private members of a base class remain inaccessible even to derived classes unless \tcode{friend} -declarations within the base class definition are used to grant access explicitly.}. +declarations within the base class definition are used to grant access explicitly.} \pnum In the absence of an diff --git a/source/algorithms.tex b/source/algorithms.tex index a32c43ea77..7d3ea7f46e 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1231,7 +1231,7 @@ \rSec2[algorithms.parallel.defns]{Terms and definitions} \pnum -A \defn{parallel algorithm} is a function template listed in this International Standard with +A \defn{parallel algorithm} is a function template listed in this document with a template parameter named \tcode{ExecutionPolicy}. \pnum @@ -1284,7 +1284,7 @@ these parallel algorithms that could be formed by the invocation with the specified default predicate or operation (where applicable) shall not directly or indirectly modify objects via their arguments, nor shall they rely on the -identity of the provided objects.. +identity of the provided objects. \rSec2[algorithms.parallel.exec]{Effect of execution policies on algorithm execution} @@ -1933,7 +1933,7 @@ \begin{itemdecl} template typename iterator_traits::difference_type - count(InputIterator first, InputIterator last, const T& value); + count(InputIterator first, InputIterator last, const T& value); template typename iterator_traits::difference_type count(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, const T& value); @@ -1969,8 +1969,8 @@ \begin{itemdecl} template pair - mismatch(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2); + mismatch(InputIterator1 first1, InputIterator1 last1, + InputIterator2 first2); template pair mismatch(ExecutionPolicy&& exec, @@ -1980,8 +1980,8 @@ template pair - mismatch(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, BinaryPredicate pred); + mismatch(InputIterator1 first1, InputIterator1 last1, + InputIterator2 first2, BinaryPredicate pred); template pair @@ -2050,7 +2050,7 @@ ForwardIterator2 first2); template + class BinaryPredicate> bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred); template + class BinaryPredicate> bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred); @@ -3201,7 +3201,8 @@ \begin{itemdescr} \pnum \requires -\tcode{*first} shall be swappable\iref{swappable.requirements}. +\tcode{BidirectionalIterator} shall satisfy the requirements of +\tcode{ValueSwappable}\iref{swappable.requirements}. \pnum \effects @@ -3212,11 +3213,6 @@ to all pairs of iterators \tcode{first + i, (last - i) - 1}. -\pnum -\requires -\tcode{BidirectionalIterator} shall satisfy the requirements of -\tcode{ValueSwappable}\iref{swappable.requirements}. - \pnum \complexity Exactly diff --git a/source/basic.tex b/source/basic.tex index 3769455111..47346e411d 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -3280,8 +3280,8 @@ describes the lifetime of base and member subobjects. \end{note} \pnum -The properties ascribed to objects and references throughout this International -Standard apply for a given object or reference only during its lifetime. \begin{note} +The properties ascribed to objects and references throughout this document +apply for a given object or reference only during its lifetime. \begin{note} In particular, before the lifetime of an object starts and after its lifetime ends there are significant restrictions on the use of the object, as described below, in~\ref{class.base.init} and @@ -3859,8 +3859,8 @@ \pnum \indextext{Boolean type}% Values of type \tcode{bool} are either \tcode{true} or -\tcode{false}.\footnote{Using a \tcode{bool} value in ways described by this International -Standard as ``undefined'', such as by examining the value of an +\tcode{false}.\footnote{Using a \tcode{bool} value in ways described by this document +as ``undefined'', such as by examining the value of an uninitialized automatic object, might cause it to behave as if it is neither \tcode{true} nor \tcode{false}.} \begin{note} There are no \tcode{signed}, \tcode{unsigned}, \tcode{short}, @@ -3885,7 +3885,7 @@ begin with 1, and are multiplied by successive integral power of 2, except perhaps for the bit with the highest position. (Adapted from the \doccite{American National Dictionary for Information Processing Systems}.)} -\begin{example} This International Standard permits two's complement, +\begin{example} This document permits two's complement, ones' complement and signed magnitude representations for integral types. \end{example} @@ -3907,7 +3907,7 @@ floating-point types}. \indextext{floating-point type!implementation-defined}% \begin{note} -This International Standard imposes no requirements on the accuracy of +This document imposes no requirements on the accuracy of floating-point operations; see also~\ref{support.limits}. \end{note} Integral and floating types are collectively @@ -4168,7 +4168,7 @@ \end{floattable} \pnum -In this International Standard, the notation \cv{} (or +In this document, the notation \cv{} (or \cvqual{cv1}, \cvqual{cv2}, etc.), used in the description of types, represents an arbitrary set of cv-qualifiers, i.e., one of \{\tcode{const}\}, \{\tcode{volatile}\}, \{\tcode{const}, diff --git a/source/compatibility.tex b/source/compatibility.tex index dbd8b065b8..4ceb1fe85f 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -191,7 +191,7 @@ Those problems not found by typesafe linkage will continue to function properly, according to the ``layout compatibility rules'' of this -International Standard. +document. \howwide Common. @@ -1112,8 +1112,8 @@ \change Additional restrictions on macro names. \rationale Avoid hard to diagnose or non-portable constructs. \effect -Names of attribute identifiers may not be used as macro names. Valid \Cpp -2003 code that defines \tcode{override}, \tcode{final}, +Names of attribute identifiers may not be used as macro names. Valid \CppIII +code that defines \tcode{override}, \tcode{final}, \tcode{carries_dependency}, or \tcode{noreturn} as macros is invalid in this International Standard. @@ -1617,7 +1617,7 @@ }; struct derived : base {}; -derived d1{}; // Error. The code was well-formed before. +derived d1{}; // error; the code was well-formed in \CppXIV derived d2; // still OK \end{codeblock} @@ -1690,6 +1690,22 @@ \rSec2[diff.cpp14.library]{\ref{library}: library introduction} +\ref{headers} +\change New headers. +\rationale New functionality. +\effect +The following \Cpp headers are new: +\tcode{}, +\tcode{}, +\tcode{}, +\tcode{}, +\tcode{}, +\tcode{}, +and +\tcode{}. +Valid \CppXIV code that \tcode{\#include}{s} headers with these names may be +invalid in this International Standard. + \ref{namespace.future} \change New reserved namespaces. \rationale Reserve namespaces for future revisions of the standard library @@ -1856,8 +1872,10 @@ from the \Cpp standard library. \pnum -The headers \tcode{}, \tcode{}\iref{depr.cstdalign.syn}, -and \tcode{}\iref{depr.cstdbool.syn} are meaningless in \Cpp. Use of +The headers \tcode{}\indextext{\idxhdr{ciso646}}, +\tcode{}\indextext{\idxhdr{cstdalign}}\iref{depr.cstdalign.syn}, +and \tcode{}\indextext{\idxhdr{cstdbool}}\iref{depr.cstdbool.syn} +are meaningless in \Cpp. Use of the \Cpp headers \tcode{}, \tcode{}, \tcode{}, and \tcode{} is deprecated\iref{depr.c.headers}. diff --git a/source/config.tex b/source/config.tex index d96308e84a..7da85d6d87 100644 --- a/source/config.tex +++ b/source/config.tex @@ -1,8 +1,8 @@ %!TEX root = std.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4687} -\newcommand{\prevdocno}{N4659} +\newcommand{\docno}{N4700} +\newcommand{\prevdocno}{N4687} \newcommand{\cppver}{201703L} %% Release date diff --git a/source/containers.tex b/source/containers.tex index dd36ee6247..b1c6112978 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -2932,6 +2932,7 @@ namespace std { // \ref{array}, class template \tcode{array} template struct array; + template bool operator==(const array& x, const array& y); template @@ -2975,6 +2976,7 @@ namespace std { // \ref{deque}, class template \tcode{deque} template > class deque; + template bool operator==(const deque& x, const deque& y); template @@ -2987,6 +2989,7 @@ bool operator>=(const deque& x, const deque& y); template bool operator<=(const deque& x, const deque& y); + template void swap(deque& x, deque& y) noexcept(noexcept(x.swap(y))); @@ -3009,6 +3012,7 @@ namespace std { // \ref{forwardlist}, class template \tcode{forward_list} template > class forward_list; + template bool operator==(const forward_list& x, const forward_list& y); template @@ -3021,6 +3025,7 @@ 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) noexcept(noexcept(x.swap(y))); @@ -3043,6 +3048,7 @@ namespace std { // \ref{list}, class template \tcode{list} template > class list; + template bool operator==(const list& x, const list& y); template @@ -3055,6 +3061,7 @@ bool operator>=(const list& x, const list& y); template bool operator<=(const list& x, const list& y); + template void swap(list& x, list& y) noexcept(noexcept(x.swap(y))); @@ -3077,6 +3084,7 @@ namespace std { // \ref{vector}, class template \tcode{vector} template > class vector; + template bool operator==(const vector& x, const vector& y); template @@ -3089,6 +3097,7 @@ bool operator>=(const vector& x, const vector& y); template bool operator<=(const vector& x, const vector& y); + template void swap(vector& x, vector& y) noexcept(noexcept(x.swap(y))); @@ -3497,19 +3506,6 @@ deque(InputIterator, InputIterator, Allocator = Allocator()) -> deque::value_type, Allocator>; - 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); - template - bool operator>=(const deque& x, const deque& y); - template - bool operator<=(const deque& x, const deque& y); - // \ref{deque.special}, specialized algorithms template void swap(deque& x, deque& y) @@ -3805,11 +3801,9 @@ forward_list() : forward_list(Allocator()) { } explicit forward_list(const Allocator&); explicit forward_list(size_type n, const Allocator& = Allocator()); - forward_list(size_type n, const T& value, - const Allocator& = Allocator()); + forward_list(size_type n, const T& value, const Allocator& = Allocator()); template - forward_list(InputIterator first, InputIterator last, - const Allocator& = Allocator()); + forward_list(InputIterator first, InputIterator last, const Allocator& = Allocator()); forward_list(const forward_list& x); forward_list(forward_list&& x); forward_list(const forward_list& x, const Allocator&); @@ -3873,10 +3867,8 @@ // \ref{forwardlist.ops}, \tcode{forward_list} operations void splice_after(const_iterator position, forward_list& x); void splice_after(const_iterator position, forward_list&& x); - void splice_after(const_iterator position, forward_list& x, - const_iterator i); - void splice_after(const_iterator position, forward_list&& x, - const_iterator i); + void splice_after(const_iterator position, forward_list& x, const_iterator i); + void splice_after(const_iterator position, forward_list&& x, const_iterator i); void splice_after(const_iterator position, forward_list& x, const_iterator first, const_iterator last); void splice_after(const_iterator position, forward_list&& x, @@ -3904,19 +3896,6 @@ forward_list(InputIterator, InputIterator, Allocator = Allocator()) -> forward_list::value_type, Allocator>; - 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); - template - bool operator>=(const forward_list& x, const forward_list& y); - template - bool operator<=(const forward_list& x, const forward_list& y); - // \ref{forwardlist.spec}, specialized algorithms template void swap(forward_list& x, forward_list& y) @@ -4580,14 +4559,12 @@ iterator insert(const_iterator position, T&& x); iterator insert(const_iterator position, size_type n, const T& x); template - iterator insert(const_iterator position, InputIterator first, - InputIterator last); + iterator insert(const_iterator position, InputIterator first, InputIterator last); iterator insert(const_iterator position, initializer_list il); iterator erase(const_iterator position); iterator erase(const_iterator position, const_iterator last); - void swap(list&) - noexcept(allocator_traits::is_always_equal::value); + void swap(list&) noexcept(allocator_traits::is_always_equal::value); void clear() noexcept; // \ref{list.ops}, list operations @@ -4595,10 +4572,8 @@ void splice(const_iterator position, list&& x); void splice(const_iterator position, list& x, const_iterator i); void splice(const_iterator position, list&& x, const_iterator i); - void splice(const_iterator position, list& x, - const_iterator first, const_iterator last); - void splice(const_iterator position, list&& x, - const_iterator first, const_iterator last); + void splice(const_iterator position, list& x, const_iterator first, const_iterator last); + void splice(const_iterator position, list&& x, const_iterator first, const_iterator last); void remove(const T& value); template void remove_if(Predicate pred); @@ -4623,19 +4598,6 @@ list(InputIterator, InputIterator, Allocator = Allocator()) -> list::value_type, Allocator>; - 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); - template - bool operator>=(const list& x, const list& y); - template - bool operator<=(const list& x, const list& y); - // \ref{list.special}, specialized algorithms template void swap(list& x, list& y) @@ -5300,19 +5262,6 @@ vector(InputIterator, InputIterator, Allocator = Allocator()) -> vector::value_type, Allocator>; - 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); - template - bool operator>=(const vector& x, const vector& y); - template - bool operator<=(const vector& x, const vector& y); - // \ref{vector.special}, specialized algorithms template void swap(vector& x, vector& y) @@ -5710,11 +5659,9 @@ vector() : vector(Allocator()) { } explicit vector(const Allocator&); explicit vector(size_type n, const Allocator& = Allocator()); - vector(size_type n, const bool& value, - const Allocator& = Allocator()); + vector(size_type n, const bool& value, const Allocator& = Allocator()); template - vector(InputIterator first, InputIterator last, - const Allocator& = Allocator()); + vector(InputIterator first, InputIterator last, const Allocator& = Allocator()); vector(const vector& x); vector(vector&& x); vector(const vector&, const Allocator&); @@ -5772,8 +5719,7 @@ iterator insert(const_iterator position, const bool& x); iterator insert(const_iterator position, size_type n, const bool& x); template - iterator insert(const_iterator position, - InputIterator first, InputIterator last); + iterator insert(const_iterator position, InputIterator first, InputIterator last); iterator insert(const_iterator position, initializer_list il); iterator erase(const_iterator position); @@ -5880,6 +5826,7 @@ template , class Allocator = allocator>> class map; + template bool operator==(const map& x, const map& y); @@ -5898,6 +5845,7 @@ template bool operator<=(const map& x, const map& y); + template void swap(map& x, map& y) @@ -5907,6 +5855,7 @@ template , class Allocator = allocator>> class multimap; + template bool operator==(const multimap& x, const multimap& y); @@ -5925,6 +5874,7 @@ template bool operator<=(const multimap& x, const multimap& y); + template void swap(multimap& x, multimap& y) @@ -5952,9 +5902,9 @@ namespace std { // \ref{set}, class template \tcode{set} - template , - class Allocator = allocator> + template , class Allocator = allocator> class set; + template bool operator==(const set& x, const set& y); @@ -5973,15 +5923,16 @@ template bool operator<=(const set& x, const set& y); + template void swap(set& x, set& y) noexcept(noexcept(x.swap(y))); // \ref{multiset}, class template \tcode{multiset} - template , - class Allocator = allocator> + template , class Allocator = allocator> class multiset; + template bool operator==(const multiset& x, const multiset& y); @@ -6000,6 +5951,7 @@ template bool operator<=(const multiset& x, const multiset& y); + template void swap(multiset& x, multiset& y) @@ -6007,12 +5959,10 @@ namespace pmr { template > - using set = std::set>; + using set = std::set>; template > - using multiset = std::multiset>; + using multiset = std::multiset>; } } \end{codeblock} @@ -6253,25 +6203,6 @@ template map(initializer_list>, Allocator) -> map, Allocator>; - template - bool operator==(const map& x, - const map& y); - template - bool operator< (const map& x, - const map& y); - template - bool operator!=(const map& x, - const map& y); - template - bool operator> (const map& x, - const map& y); - template - bool operator>=(const map& x, - const map& y); - template - bool operator<=(const map& x, - const map& y); - // \ref{map.special}, specialized algorithms template void swap(map& x, @@ -6781,25 +6712,6 @@ multimap(initializer_list>, Allocator) -> multimap, Allocator>; - template - bool operator==(const multimap& x, - const multimap& y); - template - bool operator< (const multimap& x, - const multimap& y); - template - bool operator!=(const multimap& x, - const multimap& y); - template - bool operator> (const multimap& x, - const multimap& y); - template - bool operator>=(const multimap& x, - const multimap& y); - template - bool operator<=(const multimap& x, - const multimap& y); - // \ref{multimap.special}, specialized algorithms template void swap(multimap& x, @@ -7094,25 +7006,6 @@ template set(initializer_list, Allocator) -> set, Allocator>; - template - bool operator==(const set& x, - const set& y); - template - bool operator< (const set& x, - const set& y); - template - bool operator!=(const set& x, - const set& y); - template - bool operator> (const set& x, - const set& y); - template - bool operator>=(const set& x, - const set& y); - template - bool operator<=(const set& x, - const set& y); - // \ref{set.special}, specialized algorithms template void swap(set& x, @@ -7380,25 +7273,6 @@ template multiset(initializer_list, Allocator) -> multiset, Allocator>; - template - bool operator==(const multiset& x, - const multiset& y); - template - bool operator< (const multiset& x, - const multiset& y); - template - bool operator!=(const multiset& x, - const multiset& y); - template - bool operator> (const multiset& x, - const multiset& y); - template - bool operator>=(const multiset& x, - const multiset& y); - template - bool operator<=(const multiset& x, - const multiset& y); - // \ref{multiset.special}, specialized algorithms template void swap(multiset& x, @@ -7507,22 +7381,13 @@ class Alloc = allocator>> class unordered_multimap; - template - void swap(unordered_map& x, - unordered_map& y) - noexcept(noexcept(x.swap(y))); - - template - void swap(unordered_multimap& x, - unordered_multimap& y) - noexcept(noexcept(x.swap(y))); - template bool operator==(const unordered_map& a, const unordered_map& b); template bool operator!=(const unordered_map& a, const unordered_map& b); + template bool operator==(const unordered_multimap& a, const unordered_multimap& b); @@ -7530,6 +7395,16 @@ bool operator!=(const unordered_multimap& a, const unordered_multimap& b); + template + void swap(unordered_map& x, + unordered_map& y) + noexcept(noexcept(x.swap(y))); + + template + void swap(unordered_multimap& x, + unordered_multimap& y) + noexcept(noexcept(x.swap(y))); + namespace pmr { template > class unordered_multiset; - template - void swap(unordered_set& x, - unordered_set& y) - noexcept(noexcept(x.swap(y))); - - template - void swap(unordered_multiset& x, - unordered_multiset& y) - noexcept(noexcept(x.swap(y))); - template bool operator==(const unordered_set& a, const unordered_set& b); template bool operator!=(const unordered_set& a, const unordered_set& b); + template bool operator==(const unordered_multiset& a, const unordered_multiset& b); @@ -7596,6 +7462,16 @@ bool operator!=(const unordered_multiset& a, const unordered_multiset& b); + template + void swap(unordered_set& x, + unordered_set& y) + noexcept(noexcept(x.swap(y))); + + template + void swap(unordered_multiset& x, + unordered_multiset& y) + noexcept(noexcept(x.swap(y))); + namespace pmr { template , @@ -7822,7 +7698,7 @@ class Allocator = allocator>> unordered_map(InputIterator, InputIterator, typename @\seebelow@::size_type = @\seebelow@, Hash = Hash(), Pred = Pred(), Allocator = Allocator()) - -> unordered_map, iter_value_t, Hash, Pred, + -> unordered_map, iter_val_t, Hash, Pred, Allocator>; template, @@ -7863,13 +7739,6 @@ Allocator) -> unordered_map, Allocator>; - template - bool operator==(const unordered_map& a, - const unordered_map& b); - template - bool operator!=(const unordered_map& a, - const unordered_map& b); - // \ref{unord.map.swap}, swap template void swap(unordered_map& x, @@ -8366,7 +8235,7 @@ unordered_multimap(InputIterator, InputIterator, typename @\seebelow@::size_type = @\seebelow@, Hash = Hash(), Pred = Pred(), Allocator = Allocator()) - -> unordered_multimap, iter_value_t, Hash, Pred, + -> unordered_multimap, iter_val_t, Hash, Pred, Allocator>; template, @@ -8408,13 +8277,6 @@ Hash, Allocator) -> unordered_multimap, Allocator>; - template - bool operator==(const unordered_multimap& a, - const unordered_multimap& b); - template - bool operator!=(const unordered_multimap& a, - const unordered_multimap& b); - // \ref{unord.multimap.swap}, swap template void swap(unordered_multimap& x, @@ -8744,13 +8606,6 @@ unordered_set(initializer_list, typename @\seebelow@::size_type, Hash, Allocator) -> unordered_set, Allocator>; - template - bool operator==(const unordered_set& a, - const unordered_set& b); - template - bool operator!=(const unordered_set& a, - const unordered_set& b); - // \ref{unord.set.swap}, swap template void swap(unordered_set& x, @@ -9053,13 +8908,6 @@ unordered_multiset(initializer_list, typename @\seebelow@::size_type, Hash, Allocator) -> unordered_multiset, Allocator>; - template - bool operator==(const unordered_multiset& a, - const unordered_multiset& b); - template - bool operator!=(const unordered_multiset& a, - const unordered_multiset& b); - // \ref{unord.multiset.swap}, swap template void swap(unordered_multiset& x, @@ -9216,6 +9064,7 @@ namespace std { template > class stack; + template bool operator==(const stack& x, const stack& y); template @@ -9228,6 +9077,7 @@ 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))); } @@ -9298,19 +9148,6 @@ template queue(Container, Allocator) -> queue; - 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); - 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))); @@ -9531,11 +9368,11 @@ priority_queue(const Compare& x, const Container&); explicit priority_queue(const Compare& x = Compare(), Container&& = Container()); template - priority_queue(InputIterator first, InputIterator last, - const Compare& x, const Container&); + priority_queue(InputIterator first, InputIterator last, const Compare& x, + const Container&); template priority_queue(InputIterator first, InputIterator last, - const Compare& x = Compare(), Container&& = Container()); + const Compare& x = Compare(), Container&& = Container()); template explicit priority_queue(const Alloc&); template priority_queue(const Compare&, const Alloc&); template priority_queue(const Compare&, const Container&, const Alloc&); @@ -9608,12 +9445,9 @@ \indexlibrary{\idxcode{priority_queue}!constructor}% \begin{itemdecl} template - priority_queue(InputIterator first, InputIterator last, - const Compare& x, - const Container& y); + priority_queue(InputIterator first, InputIterator last, const Compare& x, const Container& y); template - priority_queue(InputIterator first, InputIterator last, - const Compare& x = Compare(), + priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare(), Container&& y = Container()); \end{itemdecl} @@ -9855,21 +9689,6 @@ template stack(Container, Allocator) -> stack; - 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); - 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))); - template struct uses_allocator, Alloc> : uses_allocator::type { }; diff --git a/source/cover-reg.tex b/source/cover-reg.tex index 0a22c6e18a..ff05bfb99c 100644 --- a/source/cover-reg.tex +++ b/source/cover-reg.tex @@ -55,12 +55,17 @@ \thispagestyle{cpppage} -\begin{tabular}{|p{\hsize}|} -\hline +\setlength{\fboxsep}{1em} +\newlength{\copyboxwidth} +\setlength{\copyboxwidth}{\textwidth} +\addtolength{\copyboxwidth}{-2\fboxsep} +\addtolength{\copyboxwidth}{-2\fboxrule} +\fbox{% +\begin{minipage}{\copyboxwidth} +\vspace{1ex} \begin{center} \textbf{Copyright notice} \end{center} - \vspace{2ex} All rights reserved. Unless otherwise specified, @@ -73,19 +78,15 @@ from either ISO at the address below or ISO's member body in the country of the requester.\\\\ -\begin{minipage}{\hsize} \begin{indented} \microtypesetup{activate=false}% ISO copyright office\\ Case postale 56, CH-1211 Geneva 20\\ \rlap{Tel.}\hphantom{Fax} + 41 22 749 01 11\\ Fax + 41 22 749 09 47\\ -E-mail copyright@iso.org\\ -Web www.iso.org +E-mail \texttt{copyright@iso.org}\\ +Web \url{www.iso.org} \end{indented} -\end{minipage} -\\\\ -\hline -\end{tabular} +\end{minipage}} \newpage diff --git a/source/declarations.tex b/source/declarations.tex index 06d75566a7..a7ffc30e59 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1444,10 +1444,10 @@ -> decltype((h())); // does not force completion of \tcode{A}; \tcode{A::\~{}A()} is not implicitly // used within the context of this \grammarterm{decltype-specifier} void r() { - q(42); // Error: deduction against \tcode{q} succeeds, so overload resolution selects - // the specialization ``\tcode{q(T) -> decltype((h())) [with T=int]}''. - // The return type is \tcode{A}, so a temporary is introduced and its - // destructor is used, so the program is ill-formed. + q(42); // error: deduction against \tcode{q} succeeds, so overload resolution selects + // the specialization ``\tcode{q(T) -> decltype((h()))}'' with \tcode{T}$=$\tcode{int}; + // the return type is \tcode{A}, so a temporary is introduced and its + // destructor is used, so the program is ill-formed } \end{codeblock} \end{example} @@ -3372,7 +3372,7 @@ \end{bnf} The \grammarterm{string-literal} indicates the required language linkage. -This International Standard specifies the semantics for the +This document specifies the semantics for the \grammarterm{string-literal}{s} \tcode{"C"} and \tcode{"C++"}. Use of a \grammarterm{string-literal} other than \tcode{"C"} or \tcode{"C++"} is conditionally-supported, with \impldef{semantics of linkage specifiers} semantics. @@ -3716,7 +3716,7 @@ \pnum For an \grammarterm{attribute-token} (including an \grammarterm{attribute-scoped-token}) -not specified in this International Standard, the +not specified in this document, the behavior is \impldef{behavior of non-standard attributes}. Any \grammarterm{attribute-token} that is not recognized by the implementation is ignored. @@ -3916,8 +3916,7 @@ return value carries a dependency out of \tcode{f}, so that the implementation need not constrain ordering upon return from \tcode{f}. Implementations of \tcode{f} and its caller may choose to preserve dependencies instead of emitting -hardware memory ordering instructions (a.k.a. fences). - +hardware memory ordering instructions (a.k.a.\ fences). Function \tcode{g}'s second parameter has a \tcode{carries_dependency} attribute, but its first parameter does not. Therefore, function \tcode{h}'s first call to \tcode{g} carries a dependency into \tcode{g}, but its second call does not. The diff --git a/source/declarators.tex b/source/declarators.tex index f148e29f1e..f6e285e4a0 100644 --- a/source/declarators.tex +++ b/source/declarators.tex @@ -1094,7 +1094,6 @@ \begin{codeblock} float fa[17], *afp[17]; \end{codeblock} - declares an array of \tcode{float} numbers and an array of @@ -1108,7 +1107,6 @@ \begin{codeblock} int x3d[3][5][7]; \end{codeblock} - declares an array of three elements, each of which is an array of five elements, each of which is an array of seven integers. @@ -1127,7 +1125,7 @@ is equivalent to \tcode{*(x3d + i)}; in that expression, -\tcode{x3d} +\tcode{x3d} is subject to the array-to-pointer conversion\iref{conv.array} and is first converted to a pointer to a 2-dimensional @@ -2071,16 +2069,16 @@ \pnum In the \grammarterm{function-body}, a -\grammarterm{function-local predefined variable} denotes a block-scope object of static +\defnx{function-local predefined variable}{variable!function-local predefined} denotes a block-scope object of static storage duration that is implicitly defined (see~\ref{basic.scope.block}). \pnum The function-local predefined variable \tcode{__func__} is defined as if a definition of the form \begin{codeblock} -static const char __func__[] = "@\grammarterm{function-name}@"; +static const char __func__[] = "@\placeholder{function-name}@"; \end{codeblock} -had been provided, where \grammarterm{function-name} is an \impldef{string resulting +had been provided, where \tcode{\placeholder{function-name}} is an \impldef{string resulting from \mname{func}} string. It is unspecified whether such a variable has an address distinct from that of any other object in the program.\footnote{Implementations are @@ -2098,14 +2096,13 @@ \end{example} \rSec2[dcl.fct.def.default]{Explicitly-defaulted functions}% -\indextext{definition!function!explicitly-defaulted}% \pnum A function definition whose \grammarterm{function-body} is of the form \tcode{= default ;} -is called an \grammarterm{explicitly-defaulted} definition. +is called an \defnx{explicitly-defaulted}{definition!function!explicitly-defaulted} definition. A function that is explicitly defaulted shall \begin{itemize} @@ -3774,19 +3771,19 @@ Banana &&banana3 = Alaska(); // ill-formed } -const double& rcd2 = 2; // \tcode{rcd2} refers to temporary with value \tcode{2.0} -double&& rrd = 2; // \tcode{rrd} refers to temporary with value \tcode{2.0} +const double& rcd2 = 2; // \tcode{rcd2} refers to temporary with value \tcode{2.0} +double&& rrd = 2; // \tcode{rrd} refers to temporary with value \tcode{2.0} const volatile int cvi = 1; -const int& r2 = cvi; // error: cv-qualifier dropped +const int& r2 = cvi; // error: cv-qualifier dropped struct A { operator volatile int&(); } a; -const int& r3 = a; // error: cv-qualifier dropped - // from result of conversion function +const int& r3 = a; // error: cv-qualifier dropped + // from result of conversion function double d2 = 1.0; -double&& rrd2 = d2; // error: initializer is lvalue of related type +double&& rrd2 = d2; // error: initializer is lvalue of related type struct X { operator int&(); }; -int&& rri2 = X(); // error: result of conversion function is lvalue of related type +int&& rri2 = X(); // error: result of conversion function is lvalue of related type int i3 = 2; -double&& rrd3 = i3; // \tcode{rrd3} refers to temporary with value \tcode{2.0} +double&& rrd3 = i3; // \tcode{rrd3} refers to temporary with value \tcode{2.0} \end{codeblock} \end{example} \end{itemize} @@ -3882,8 +3879,8 @@ \begin{example} \begin{codeblock} struct A { int x; int y; int z; }; -A a{.y = 2, .x = 1}; // error: designator order does not match declaration order -A b{.x = 1, .z = 2}; // OK, \tcode{b.y} initialized to \tcode{0} +A a{.y = 2, .x = 1}; // error: designator order does not match declaration order +A b{.x = 1, .z = 2}; // OK, \tcode{b.y} initialized to \tcode{0} \end{codeblock} \end{example} @@ -4128,7 +4125,7 @@ struct A { std::initializer_list i4; - A() : i4{ 1, 2, 3 } {} // ill-formed, would create a dangling reference + A() : i4{ 1, 2, 3 } {} // ill-formed, would create a dangling reference }; \end{codeblock} @@ -4174,24 +4171,23 @@ list-initializations.\end{note} \begin{example} \begin{codeblock} -int x = 999; // \tcode{x} is not a constant expression +int x = 999; // \tcode{x} is not a constant expression const int y = 999; const int z = 99; -char c1 = x; // OK, though it might narrow (in this case, it does narrow) -char c2{x}; // error: might narrow -char c3{y}; // error: narrows (assuming \tcode{char} is 8 bits) -char c4{z}; // OK: no narrowing needed -unsigned char uc1 = {5}; // OK: no narrowing needed -unsigned char uc2 = {-1}; // error: narrows -unsigned int ui1 = {-1}; // error: narrows +char c1 = x; // OK, though it might narrow (in this case, it does narrow) +char c2{x}; // error: might narrow +char c3{y}; // error: narrows (assuming \tcode{char} is 8 bits) +char c4{z}; // OK: no narrowing needed +unsigned char uc1 = {5}; // OK: no narrowing needed +unsigned char uc2 = {-1}; // error: narrows +unsigned int ui1 = {-1}; // error: narrows signed int si1 = - { (unsigned int)-1 }; // error: narrows -int ii = {2.0}; // error: narrows -float f1 { x }; // error: might narrow -float f2 { 7 }; // OK: 7 can be exactly represented as a \tcode{float} + { (unsigned int)-1 }; // error: narrows +int ii = {2.0}; // error: narrows +float f1 { x }; // error: might narrow +float f2 { 7 }; // OK: 7 can be exactly represented as a \tcode{float} int f(int); -int a[] = - { 2, f(2), f(2.0) }; // OK: the \tcode{double}-to-\tcode{int} conversion is not at the top level +int a[] = { 2, f(2), f(2.0) }; // OK: the \tcode{double}-to-\tcode{int} conversion is not at the top level \end{codeblock} \end{example}% \indextext{initialization!list-initialization|)}% diff --git a/source/derived.tex b/source/derived.tex index 8ea764d550..6833ebf167 100644 --- a/source/derived.tex +++ b/source/derived.tex @@ -767,10 +767,10 @@ bp->vf1(); // calls \tcode{Derived::vf1()} bp->vf2(); // calls \tcode{Base::vf2()} bp->f(); // calls \tcode{Base::f()} (not virtual) - B* p = bp->vf4(); // calls \tcode{Derived::pf()} and converts the + B* p = bp->vf4(); // calls \tcode{Derived::vf4()} and converts the // result to \tcode{B*} Derived* dp = &d; - D* q = dp->vf4(); // calls \tcode{Derived::pf()} and does not + D* q = dp->vf4(); // calls \tcode{Derived::vf4()} and does not // convert the result to \tcode{B*} dp->vf2(); // ill-formed: argument mismatch } @@ -866,7 +866,7 @@ \end{codeblock} Both \tcode{VB1::f} and \tcode{VB2::f} override \tcode{A::f} but there is no overrider of both of them in class \tcode{Error}. This example is -therefore ill-formed. Class \tcode{Okay} is well formed, however, +therefore ill-formed. Class \tcode{Okay} is well-formed, however, because \tcode{Okay::f} is a final overrider. \end{example} diff --git a/source/diagnostics.tex b/source/diagnostics.tex index 4fe7925c52..1dcb7f3f4f 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -937,8 +937,7 @@ The class \tcode{error_category} serves as a base class for types used to identify the source and encoding of a particular category of error code. Classes may be derived from \tcode{error_category} to support -categories of errors in addition to those defined in this International -Standard. +categories of errors in addition to those defined in this document. Such classes shall behave as specified in this subclause. \begin{note} \tcode{error_category} objects are passed by reference, and two such objects @@ -1272,7 +1271,7 @@ \indexlibrarymember{operator=}{error_code}% \begin{itemdecl} template - error_code& operator=(ErrorCodeEnum e) noexcept; + error_code& operator=(ErrorCodeEnum e) noexcept; \end{itemdecl} \begin{itemdescr} @@ -1365,8 +1364,7 @@ \indexlibrarymember{operator<<}{error_code}% \begin{itemdecl} template - basic_ostream& - operator<<(basic_ostream& os, const error_code& ec); + basic_ostream& operator<<(basic_ostream& os, const error_code& ec); \end{itemdecl} \begin{itemdescr} @@ -1477,7 +1475,7 @@ \indexlibrarymember{operator=}{error_condition}% \begin{itemdecl} template - error_condition& operator=(ErrorConditionEnum e) noexcept; + error_condition& operator=(ErrorConditionEnum e) noexcept; \end{itemdecl} \begin{itemdescr} @@ -1568,7 +1566,7 @@ \returns \begin{codeblock} lhs.category() < rhs.category() || -(lhs.category() == rhs.category() && lhs.value() < rhs.value()); +(lhs.category() == rhs.category() && lhs.value() < rhs.value()) \end{codeblock} \end{itemdescr} @@ -1579,8 +1577,11 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.category() < rhs.category() || lhs.category() == rhs.category() \&\&\\ -lhs.value() < rhs.value()}. +\returns +\begin{codeblock} +lhs.category() < rhs.category() || +(lhs.category() == rhs.category() && lhs.value() < rhs.value()) +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator==}{error_code}% @@ -1590,7 +1591,10 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.category() == rhs.category() \&\& lhs.value() == rhs.value()}. +\returns +\begin{codeblock} +lhs.category() == rhs.category() && lhs.value() == rhs.value() +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator==}{error_condition}% @@ -1601,8 +1605,10 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.category().equivalent(lhs.value(), rhs) || rhs.category().equivalent(lhs, -rhs.value())}. +\returns +\begin{codeblock} +lhs.category().equivalent(lhs.value(), rhs) || rhs.category().equivalent(lhs, rhs.value()) +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator==}{error_condition}% @@ -1613,7 +1619,10 @@ \begin{itemdescr} \pnum -\returns \tcode{rhs.category().equivalent(rhs.value(), lhs) || lhs.category().equivalent(rhs, lhs.value())}. +\returns +\begin{codeblock} +rhs.category().equivalent(rhs.value(), lhs) || lhs.category().equivalent(rhs, lhs.value()) +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator==}{error_condition}% @@ -1623,7 +1632,10 @@ \begin{itemdescr} \pnum -\returns \tcode{lhs.category() == rhs.category() \&\& lhs.value() == rhs.value()}. +\returns +\begin{codeblock} +lhs.category() == rhs.category() && lhs.value() == rhs.value() +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator"!=}{error_code}% @@ -1697,8 +1709,7 @@ \effects Constructs an object of class \tcode{system_error}. \pnum -\postconditions \tcode{code() == ec}. - +\postconditions \tcode{code() == ec} and \tcode{string(what()).find(what_arg) != string::npos}. \end{itemdescr} @@ -1712,8 +1723,7 @@ \effects Constructs an object of class \tcode{system_error}. \pnum -\postconditions \tcode{code() == ec}. - +\postconditions \tcode{code() == ec} and \tcode{string(what()).find(what_arg) != string::npos}. \end{itemdescr} @@ -1740,8 +1750,7 @@ \effects Constructs an object of class \tcode{system_error}. \pnum -\postconditions \tcode{code() == error_code(ev, ecat)}. - +\postconditions \raggedright \tcode{code() == error_code(ev, ecat)} and\linebreak \tcode{string(what()).find(what_arg) != string::npos}. \end{itemdescr} @@ -1755,8 +1764,7 @@ \effects Constructs an object of class \tcode{system_error}. \pnum -\postconditions \tcode{code() == error_code(ev, ecat)}. - +\postconditions \raggedright \tcode{code() == error_code(ev, ecat)} and\linebreak \tcode{string(what()).find(what_arg) != string::npos}. \end{itemdescr} diff --git a/source/expressions.tex b/source/expressions.tex index 5b99d285b2..cd84a99873 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -1761,8 +1761,8 @@ \end{codeblock} The \grammarterm{compound-requirement} in \tcode{C1} requires that \tcode{x++} is a valid expression. -It is equivalent to a \grammarterm{simple-requirement} -with the same \grammarterm{expression}. +It is equivalent to the \grammarterm{simple-requirement} +\tcode{x++;}. \begin{codeblock} template concept C2 = requires(T x) { @@ -5394,7 +5394,7 @@ \item an operation that would have undefined behavior as specified in \ref{intro} through \ref{cpp} -of this International Standard \begin{note} including, +of this document \begin{note} including, for example, signed integer overflow\iref{expr}, certain pointer arithmetic\iref{expr.add}, division by zero\iref{expr.mul}, or certain shift operations\iref{expr.shift} @@ -5530,7 +5530,7 @@ If \tcode{e} satisfies the constraints of a core constant expression, but evaluation of \tcode{e} would evaluate an operation that has undefined behavior as specified in \ref{library} through \ref{\lastlibchapter} of this -International Standard, it is unspecified whether \tcode{e} is a core constant +document, it is unspecified whether \tcode{e} is a core constant expression. \begin{example} @@ -5673,7 +5673,7 @@ function. \pnum -\begin{note} Since this International Standard +\begin{note} Since this document imposes no restrictions on the accuracy of floating-point operations, it is unspecified whether the evaluation of a floating-point expression during translation yields the same result as the evaluation of the same expression (or the same operations on the same values) during program diff --git a/source/front.tex b/source/front.tex index ebc2d54361..1961ad74cf 100644 --- a/source/front.tex +++ b/source/front.tex @@ -3,7 +3,7 @@ % \input{cover-reg} %%-------------------------------------------------- -%% The table of contents, list of tables, and list of figures +%% The table of contents \markboth{\contentsname}{} %%-------------------------------------------------- @@ -12,9 +12,11 @@ \renewcommand\@pnumwidth{2.5em} \makeatother -\tableofcontents +%% Include table of contents. Do not list "Contents" +%% within it (per ISO request) but do include a +%% bookmark for it in the PDF. +\phantomsection +\pdfbookmark{\contentsname}{toctarget} +\hypertarget{toctarget}{\tableofcontents*} + \setcounter{tocdepth}{5} -\newpage -\listoftables -\newpage -\listoffigures diff --git a/source/future.tex b/source/future.tex index 4bb60c7c1c..b770fcad99 100644 --- a/source/future.tex +++ b/source/future.tex @@ -1304,7 +1304,7 @@ \pnum To enable old function adaptors to manipulate function objects that take one or two arguments, -many of the function objects in this International Standard +many of the function objects in this document correspondingly provide \grammarterm{typedef-name}{s} \tcode{argument_type} and \tcode{result_type} for function objects that take one argument and diff --git a/source/intro.tex b/source/intro.tex index c43e357c35..977344538f 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -38,8 +38,6 @@ \item ISO/IEC 2382 (all parts), \doccite{Information technology --- Vocabulary} \item ISO/IEC 9899:2011, \doccite{Programming languages --- C} -\item ISO/IEC 9899:2011/Cor.1:2012(E), \doccite{Programming languages --- C, -Technical Corrigendum 1} \item ISO/IEC 9945:2003, \doccite{Information Technology --- Portable Operating System Interface (POSIX)} \item ISO/IEC 10646-1:1993, \doccite{Information technology --- @@ -85,8 +83,8 @@ for use in standardization at the following addresses: \begin{itemize} -\item IEC Electropedia: available at \url{http://www.electropedia.org/} \item ISO Online browsing platform: available at \url{http://www.iso.org/obp} +\item IEC Electropedia: available at \url{http://www.electropedia.org/} \end{itemize} \pnum @@ -101,7 +99,7 @@ \indexdefn{access}% \definition{access}{defns.access} -\defncontext{execution-time action} to read or modify the value of an object +\defncontext{execution-time action} read or modify the value of an object \indexdefn{argument}% \indexdefn{argument!function call expression} @@ -118,7 +116,7 @@ \indexdefn{argument}% \indexdefn{argument!throw expression}% \definition{argument}{defns.argument.throw} -\defncontext{throw expression} the operand of \tcode{throw}\iref{expr.throw} +\defncontext{throw expression} operand of \tcode{throw}\iref{expr.throw} \indexdefn{argument}% \indexdefn{argument!template instantiation}% @@ -131,15 +129,18 @@ \indexdefn{block}% \definition{block}{defns.block} -a thread of execution that blocks is waiting for some condition (other than -for the implementation to execute its execution steps) to be satisfied before -it can continue execution past the blocking operation +wait for some condition (other than for the implementation to execute +the execution steps of the thread of execution) to be satisfied before +continuing execution past the blocking operation \indexdefn{behavior!conditionally-supported}% \definition{conditionally-supported}{defns.cond.supp} -program construct that an implementation is not required to support\\ -\begin{note} Each implementation documents all conditionally-supported -constructs that it does not support.\end{note} +program construct that an implementation is not required to support + +\begin{defnote} +Each implementation documents all conditionally-supported +constructs that it does not support. +\end{defnote} \indexdefn{message!diagnostic}% \definition{diagnostic message}{defns.diagnostic} @@ -149,7 +150,8 @@ \indexdefn{type!dynamic}% \definition{dynamic type}{defns.dynamic.type} \defncontext{glvalue} type of the most derived object\iref{intro.object} to which the -glvalue refers\\ +glvalue refers + \begin{example} If a pointer\iref{dcl.ptr} \tcode{p} whose static type is ``pointer to class \tcode{B}'' is pointing to an object of class \tcode{D}, derived @@ -183,10 +185,12 @@ \indexdefn{character!multibyte}% \definition{multibyte character}{defns.multibyte} sequence of one or more bytes representing a member of the extended -character set of either the source or the execution environment\\ -\begin{note} The -extended character set is a superset of the basic character -set\iref{lex.charset}.\end{note} +character set of either the source or the execution environment + +\begin{defnote} +The extended character set is a superset of the basic character +set\iref{lex.charset}. +\end{defnote} \indexdefn{parameter}% \indexdefn{parameter!function}% @@ -216,8 +220,11 @@ enclosing namespace (if any), and \grammarterm{requires-clause}\iref{temp.constr.decl} (if any) -\begin{note} Signatures are used as a basis for -name mangling and linking.\end{note} + +\begin{defnote} +Signatures are used as a basis for +name mangling and linking. +\end{defnote} \indexdefn{signature}% \definition{signature}{defns.signature.templ} @@ -267,11 +274,13 @@ \indexdefn{type!static}% \definition{static type}{defns.static.type} type of an expression\iref{basic.types} resulting from -analysis of the program without considering execution semantics\\ -\begin{note} The -static type of an expression depends only on the form of the program in +analysis of the program without considering execution semantics + +\begin{defnote} +The static type of an expression depends only on the form of the program in which the expression appears, and does not change while the program is -executing. \end{note} +executing. +\end{defnote} \indexdefn{unblock}% \definition{unblock}{defns.unblock} @@ -279,10 +288,12 @@ \indexdefn{behavior!undefined}% \definition{undefined behavior}{defns.undefined} -behavior for which this International Standard -imposes no requirements\\ -\begin{note} Undefined behavior may be expected when -this International Standard omits any explicit +behavior for which this document +imposes no requirements + +\begin{defnote} +Undefined behavior may be expected when +this document omits any explicit definition of behavior or when a program uses an erroneous construct or erroneous data. Permissible undefined behavior ranges from ignoring the situation completely with unpredictable results, to @@ -293,21 +304,23 @@ not engender undefined behavior; they are required to be diagnosed. Evaluation of a constant expression never exhibits behavior explicitly specified as undefined\iref{expr.const}. -\end{note} +\end{defnote} \indexdefn{behavior!unspecified}% \definition{unspecified behavior}{defns.unspecified} behavior, for a well-formed program construct and correct data, that -depends on the implementation\\ -\begin{note} The implementation is not required to +depends on the implementation + +\begin{defnote} +The implementation is not required to document which behavior occurs. The range of -possible behaviors is usually delineated by this International Standard. -\end{note} +possible behaviors is usually delineated by this document. +\end{defnote} \indexdefn{program!well-formed}% \definition{well-formed program}{defns.well.formed} \Cpp program constructed according to the syntax rules, diagnosable -semantic rules, and the one-definition rule\iref{basic.def.odr}.% +semantic rules, and the one-definition rule\iref{basic.def.odr}% \indextext{definitions|)} \rSec0[intro]{General principles} @@ -341,34 +354,34 @@ \indextext{conformance requirements!general|(}% The set of \defn{diagnosable rules} -consists of all syntactic and semantic rules in this International -Standard except for those rules containing an explicit notation that +consists of all syntactic and semantic rules in this document +except for those rules containing an explicit notation that ``no diagnostic is required'' or which are described as resulting in ``undefined behavior''. \pnum \indextext{conformance requirements!method of description}% -Although this International Standard states only requirements on \Cpp +Although this document states only requirements on \Cpp implementations, those requirements are often easier to understand if they are phrased as requirements on programs, parts of programs, or execution of programs. Such requirements have the following meaning: \begin{itemize} \item If a program contains no violations of the rules in this -International Standard, a conforming implementation shall, +document, a conforming implementation shall, within its resource limits, accept and correctly execute\footnote{``Correct execution'' can include undefined behavior, depending on the data being processed; see \ref{intro.defs} and~\ref{intro.execution}.} that program. \item \indextext{message!diagnostic}% If a program contains a violation of any diagnosable rule or an occurrence -of a construct described in this International Standard as ``conditionally-supported'' when +of a construct described in this document as ``conditionally-supported'' when the implementation does not support that construct, a conforming implementation shall issue at least one diagnostic message. \item \indextext{behavior!undefined}% If a program contains a violation of a rule for which no diagnostic -is required, this International Standard places no requirement on +is required, this document places no requirement on implementations with respect to that program. \end{itemize} \begin{note} @@ -408,7 +421,7 @@ \pnum Two kinds of implementations are defined: a \defn{hosted implementation} and a \defn{freestanding implementation}. For a hosted implementation, this -International Standard defines the set of available libraries. A freestanding +document defines the set of available libraries. A freestanding implementation is one in which execution may take place without the benefit of an operating system, and has an \impldef{required libraries for freestanding implementation} set of libraries that includes certain language-support @@ -419,7 +432,7 @@ additional library functions), provided they do not alter the behavior of any well-formed program. Implementations are required to diagnose programs that use such -extensions that are ill-formed according to this International Standard. +extensions that are ill-formed according to this document. Having done so, however, they can compile and execute such programs. \pnum @@ -764,9 +777,9 @@ \pnum \indextext{program execution|(}% \indextext{program execution!abstract machine}% -The semantic descriptions in this International Standard define a -parameterized nondeterministic abstract machine. This International -Standard places no requirement on the structure of conforming +The semantic descriptions in this document define a +parameterized nondeterministic abstract machine. This document +places no requirement on the structure of conforming implementations. In particular, they need not copy or emulate the structure of the abstract machine. \indextext{as-if rule}% @@ -774,7 +787,7 @@ Rather, conforming implementations are required to emulate (only) the observable behavior of the abstract machine as explained below.\footnote{This provision is sometimes called the ``as-if'' rule, because an implementation is free to -disregard any requirement of this International Standard as long as the result +disregard any requirement of this document as long as the result is \emph{as if} the requirement had been obeyed, as far as can be determined from the observable behavior of the program. For instance, an actual implementation need not evaluate part of an expression if it can deduce that its @@ -786,7 +799,7 @@ \indextext{behavior!implementation-defined}% \pnum Certain aspects and operations of the abstract machine are described in this -International Standard as implementation-defined (for example, +document as implementation-defined (for example, \tcode{sizeof(int)}). These constitute the parameters of the abstract machine. Each implementation shall include documentation describing its characteristics and behavior in these respects.\footnote{This documentation also includes @@ -798,20 +811,20 @@ \indextext{behavior!unspecified}% \pnum Certain other aspects and operations of the abstract machine are -described in this International Standard as unspecified (for example, +described in this document as unspecified (for example, evaluation of expressions in a \grammarterm{new-initializer} if the allocation function fails to allocate memory\iref{expr.new}). Where possible, this -International Standard defines a set of allowable behaviors. These +document defines a set of allowable behaviors. These define the nondeterministic aspects of the abstract machine. An instance of the abstract machine can thus have more than one possible execution for a given program and a given input. \indextext{behavior!undefined}% \pnum -Certain other operations are described in this International Standard as +Certain other operations are described in this document as undefined (for example, the effect of attempting to modify a \tcode{const} object). -\begin{note} This International Standard imposes no requirements on the +\begin{note} This document imposes no requirements on the behavior of programs that contain undefined behavior. \end{note} \indextext{program!well-formed}% @@ -822,7 +835,7 @@ of the corresponding instance of the abstract machine with the same program and the same input. \indextext{behavior!undefined}% -However, if any such execution contains an undefined operation, this International Standard places no +However, if any such execution contains an undefined operation, this document places no requirement on the implementation executing that program with that input (not even with regard to operations preceding the first undefined operation). @@ -1004,9 +1017,9 @@ // full-expression is destruction of \tcode{s2} at end of block } struct B { - B(S = S(0)); - }; - B b[2] = { B(), B() }; // full-expression is the entire initialization + B(S = S(0)); +}; +B b[2] = { B(), B() }; // full-expression is the entire initialization // including the destruction of temporaries \end{codeblock} \end{example} @@ -1168,7 +1181,7 @@ through a pointer or reference\iref{basic.compound}.} Under a hosted implementation, a \Cpp program can have more than one thread running concurrently. The execution of each thread proceeds as defined by the remainder -of this International Standard. The execution of the entire program consists of an execution +of this document. The execution of the entire program consists of an execution of all of its threads. \begin{note} Usually the execution can be viewed as an interleaving of all its threads. However, some kinds of atomic operations, for example, allow executions inconsistent with a simple interleaving, as described @@ -1403,12 +1416,14 @@ \end{note} \pnum +\indextext{coherence!write-write}% If an operation \placeholder{A} that modifies an atomic object \placeholder{M} happens before an operation \placeholder{B} that modifies \placeholder{M}, then \placeholder{A} shall be earlier than \placeholder{B} in the modification order of \placeholder{M}. \begin{note} This requirement is known as write-write coherence. \end{note} \pnum +\indextext{coherence!read-read}% If a \indextext{value computation}% value computation \placeholder{A} of an atomic object \placeholder{M} happens before a @@ -1421,6 +1436,7 @@ \begin{note} This requirement is known as read-read coherence. \end{note} \pnum +\indextext{coherence!read-write}% If a \indextext{value computation}% value computation \placeholder{A} of an atomic object \placeholder{M} happens before an @@ -1430,6 +1446,7 @@ read-write coherence. \end{note} \pnum +\indextext{coherence!write-read}% If a \indextext{side effects}% side effect \placeholder{X} on an atomic object \placeholder{M} happens before a value @@ -1498,7 +1515,7 @@ \pnum \begin{note} Compiler transformations that introduce assignments to a potentially shared memory location that would not be modified by the abstract machine are -generally precluded by this International Standard, since such an assignment might overwrite +generally precluded by this document, since such an assignment might overwrite another assignment by a different thread in cases in which an abstract machine execution would not have encountered a data race. This includes implementations of data member assignment that overwrite adjacent members in separate memory @@ -1509,7 +1526,7 @@ \pnum \begin{note} Transformations that introduce a speculative read of a potentially shared memory location may not preserve the semantics of the \Cpp program as -defined in this International Standard, since they potentially introduce a data race. However, +defined in this document, since they potentially introduce a data race. However, they are typically valid in the context of an optimizing compiler that targets a specific machine with well-defined semantics for data races. They would be invalid for a hypothetical machine that is not tolerant of races or provides diff --git a/source/iostreams.tex b/source/iostreams.tex index d213d4ff59..f084a61eab 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -1461,7 +1461,7 @@ calling \tcode{iword} with the same index yields another reference to the same value. -If the function fails\footnote{for example, because it cannot allocate space.} +If the function fails\footnote{For example, because it cannot allocate space.} and \tcode{*this} is a base class subobject of a @@ -1505,7 +1505,7 @@ calling \tcode{pword} with the same index yields another reference to the same value. -If the function fails\footnote{for example, because it cannot allocate space.} +If the function fails\footnote{For example, because it cannot allocate space.} and \tcode{*this} is a base class subobject of a @@ -1919,7 +1919,7 @@ \begin{itemdescr} \pnum \requires -If \tcode{tiestr} is not null, \tcode{tiestr} must not be reachable by +If \tcode{tiestr} is not null, \tcode{tiestr} shall not be reachable by traversing the linked list of tied stream objects starting from \tcode{tiestr->tie()}. @@ -7676,14 +7676,16 @@ \end{libtab2} \pnum -For a sequence to be positioned, if its next pointer +For a sequence to be positioned, +the function determines \tcode{newoff} as indicated in +Table~\ref{tab:iostreams.newoff.values}. +If the sequence's next pointer (either \tcode{gptr()} or \tcode{pptr()}) -is a null pointer and the new offset \tcode{newoff} is nonzero, the positioning -operation fails. Otherwise, the function determines \tcode{newoff} as indicated in -Table~\ref{tab:iostreams.newoff.values}. +is a null pointer and \tcode{newoff} is nonzero, +the positioning operation fails. \begin{libtab2}{\tcode{newoff} values}{tab:iostreams.newoff.values} {lp{2.0in}}{Condition}{\tcode{newoff} Value} @@ -9936,6 +9938,47 @@ This subclause describes operations on file systems and their components, such as paths, regular files, and directories. +\pnum +A \defn{file system} is +a collection of files and their attributes. + +\pnum +A \defn{file} is +an object within a file system that holds user or system data. Files can be written to, or read from, or both. A file +has certain attributes, including type. File types include regular files +and directories. Other types of files, such as symbolic links, +may be supported by the implementation. + +\pnum +A \defn{directory} is +a file within a file system that acts as a container of directory entries +that contain information about +other files, possibly including other directory files. +The \defn{parent directory} of a directory is +the directory that both contains a +directory entry for the given directory and is represented by the filename +\grammarterm{dot-dot} in the given directory. +The \defn{parent directory} +of other types of files is a directory containing a directory +entry for the file under discussion. + +\pnum +A \defn{link} is +an object that associates a filename with a file. Several links can associate names with the same file. +A \defn{hard link} is +a link to an existing file. Some +file systems support multiple hard links to a file. If the last hard link to a +file is removed, the file itself is removed. +\begin{note} A hard link can be thought of as a shared-ownership smart +pointer to a file.\end{note} +A \defn{symbolic link} is +a type of file with the +property that when the file is encountered during pathname resolution\iref{fs.class.path}, a string +stored by the file is used to modify the pathname resolution. +\begin{note} Symbolic links are often called symlinks. A symbolic link can be thought of as a raw pointer to a file. +If the file pointed to does not exist, the symbolic link is said to be a +``dangling'' symbolic link.\end{note} + \rSec2[fs.conformance]{Conformance} \pnum @@ -9972,8 +10015,11 @@ \rSec3[fs.conform.os]{Operating system dependent behavior conformance} \pnum -Some behavior is specified as being -operating system dependent\iref{fs.def.osdep}. The operating system an +Behavior that is specified as being +\defn{operating system dependent} +is dependent upon the behavior +and characteristics of an operating system. +The operating system an implementation is dependent upon is \impldef{operating system on which implementation depends}. @@ -9984,7 +10030,12 @@ \rSec3[fs.race.behavior]{File system race behavior} \pnum -Behavior is undefined if calls to functions provided by this subclause introduce a file system race\iref{fs.def.race}. +A \defn{file system race} is +the condition that occurs +when multiple threads, processes, or computers interleave access and +modification of +the same object within a file system. +Behavior is undefined if calls to functions provided by this subclause introduce a file system race. \pnum If the possibility of a file system race would make it unreliable for a @@ -10006,144 +10057,6 @@ products. } -\rSec2[fs.definitions]{Terms and definitions} - -\definition{absolute path}{fs.def.absolute.path} -A path that unambiguously -identifies the location of a file without reference to an additional starting -location. The elements of a path that determine if it is absolute are -operating system dependent. - -\definition{directory}{fs.def.directory} -A file within a file system that acts as a container of directory entries -that contain information about -other files, possibly including other directory files. - -\definition{file}{fs.def.file} -An object within a file system that holds user or system data. Files can be written to, or read from, or both. A file -has certain attributes, including type. File types include regular files -and directories. Other types of files, such as symbolic links\iref{fs.def.symlink}, -may be supported by the implementation. - -\definition{file system}{fs.def.filesystem} -A collection of files and their attributes. - -\definition{file system race}{fs.def.race} -The condition that occurs -when multiple threads, processes, or computers interleave access and -modification of -the same object within a file system. - -\definition{filename}{fs.def.filename} -The name of a file. Filenames \grammarterm{dot} and \grammarterm{dot-dot}, -consisting solely of one and two period characters respectively, -have special meaning. -The following characteristics of filenames are operating system dependent: -\begin{itemize} -\item The permitted characters. \begin{example} Some operating systems prohibit - the ASCII control characters (0x00 -- 0x1F) in filenames. \end{example} -\item The maximum permitted length. -\item Filenames that are not permitted. -\item Filenames that have special meaning. -\item Case awareness and sensitivity during path resolution. -\item Special rules that may apply to file types other than regular - files, such as directories. -\end{itemize} - -\definition{hard link}{fs.def.hardlink} -A link\iref{fs.def.link} to an existing file. Some -file systems support multiple hard links to a file. If the last hard link to a -file is removed, the file itself is removed. -\begin{note} A hard link can be thought of as a shared-ownership smart -pointer to a file.\end{note} - -\definition{link}{fs.def.link} -An object that associates a filename with a file. Several links can associate names with the same file. - -\definition{native encoding}{fs.def.native.encode} -For narrow character strings, the operating system dependent current encoding -for pathnames\iref{fs.def.pathname}. For wide character strings, the implementation-defined execution -wide-character set encoding\iref{lex.charset}. - -\definition{native pathname format}{fs.def.native} -The operating system dependent pathname format accepted by the host operating system. - -\definition{normal form}{fs.def.normal.form} -A path in normal form is said to be \term{normalized}. -The process of obtaining a normalized path -from a path that is not in normal form is called \term{normalization}. - -Normalization of a generic format pathname means: - -\begin{enumerate} -\item If the path is empty, stop. -\item Replace each slash character in the \grammarterm{root-name} with a \grammarterm{preferred-separator}. -\item Replace each \grammarterm{directory-separator} with a \grammarterm{preferred-separator}. -\begin{note} -The generic pathname grammar\iref{fs.path.generic} defines \grammarterm{directory-separator} as one or more slashes and \grammarterm{preferred-separator}{s}. -\end{note} -\item Remove each \grammarterm{dot} filename and any immediately following \grammarterm{directory-separator}. -\item As long as any appear, remove a non-\grammarterm{dot-dot} filename immediately followed by a \grammarterm{directory-separator} and a \grammarterm{dot-dot} filename, along with any immediately following \grammarterm{directory-separator}. -\item If there is a \grammarterm{root-directory}, remove all \grammarterm{dot-dot} filenames and any \grammarterm{directory-separator}{s} immediately following them. -\begin{note} -These \grammarterm{dot-dot} filenames attempt to refer to nonexistent parent directories. -\end{note} -\item If the last filename is \grammarterm{dot-dot}, remove any trailing \grammarterm{directory-separator}. -\item If the path is empty, add a \grammarterm{dot}. -\end{enumerate} - -\definition{operating system dependent behavior}{fs.def.osdep} -Behavior that is dependent upon the behavior -and characteristics of an operating system. See~\ref{fs.conform.os}. - -\definition{parent directory}{fs.def.parent} -\defncontext{of a directory} the directory that both contains a -directory entry for the given directory and is represented by the filename -\grammarterm{dot-dot} in the given directory. - -\definition{parent directory}{fs.def.parent.other} -\defncontext{of other types of files} a directory containing a directory -entry for the file under discussion. - -\definition{path}{fs.def.path} -A sequence of elements that identify -the location of a file within a filesystem. -The elements are the -\grammarterm{root-name}\opt{}, -\grammarterm{root-directory}\opt{}, -and an optional sequence of filenames. -The maximum number of elements in the sequence is operating system dependent. - -\definition{pathname}{fs.def.pathname} -A character string that represents the name of a path. Pathnames are -formatted according to the generic pathname format grammar\iref{fs.path.generic} or an -operating system dependent -native pathname format. - -\definition{pathname resolution}{fs.def.pathres} -Pathname resolution is the operating system dependent mechanism for resolving -a pathname to a particular file in a file hierarchy. There may be multiple -pathnames that resolve to the same file. -\begin{example} POSIX specifies the mechanism in section 4.11, Pathname resolution. -\end{example} - -\definition{relative path}{fs.def.rel.path} -A path that is not absolute, and as such, only unambiguously -identifies the location of a file when resolved\iref{fs.def.pathres} relative to -an implied starting location. The elements of a path that determine if it is -relative are operating system dependent. -\begin{note} -Pathnames ``.'' and ``..'' are relative paths. -\end{note} - -\definition{symbolic link}{fs.def.symlink} -A type of file with the -property that when the file is encountered during pathname resolution, a string -stored by the file is used to modify the pathname resolution. -\begin{note} Symbolic links are often called symlinks. A symbolic link can be thought of as a raw pointer to a file. -If the file pointed to does not exist, the symbolic link is said to be a -``dangling'' symbolic link.\end{note} - \rSec2[fs.req]{Requirements} \pnum @@ -10302,13 +10215,13 @@ void current_path(const path& p); void current_path(const path& p, error_code& ec) noexcept; + bool equivalent(const path& p1, const path& p2); + bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept; + bool exists(file_status s) noexcept; bool exists(const path& p); bool exists(const path& p, error_code& ec) noexcept; - bool equivalent(const path& p1, const path& p2); - bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept; - uintmax_t file_size(const path& p); uintmax_t file_size(const path& p, error_code& ec) noexcept; @@ -10468,8 +10381,8 @@ \indexlibrary{\idxcode{path}}% \pnum -An object of class \tcode{path} represents a path\iref{fs.def.path} -and contains a pathname\iref{fs.def.pathname}. +An object of class \tcode{path} represents a path +and contains a pathname. Such an object is concerned only with the lexical and syntactic aspects of a path. The path does not necessarily exist in external storage, and the pathname is not necessarily valid for the current operating @@ -10480,6 +10393,47 @@ Class \tcode{path} is used to support the differences between the string types used by different operating systems to represent pathnames, and to perform conversions between encodings when necessary. \end{note} +\pnum +A \defn{path} is +a sequence of elements that identify +the location of a file within a filesystem. +The elements are the +\grammarterm{root-name}\opt{}, +\grammarterm{root-directory}\opt{}, +and an optional sequence of \grammarterm{filename}{s}\iref{fs.path.generic}. +The maximum number of elements in the sequence is +operating system dependent\iref{fs.conform.os}. + +\pnum +An \defn{absolute path} is a path that unambiguously +identifies the location of a file without reference to an additional starting +location. The elements of a path that determine if it is absolute are +operating system dependent. +A \defn{relative path} is +a path that is not absolute, and as such, only unambiguously +identifies the location of a file when resolved relative to +an implied starting location. The elements of a path that determine if it is +relative are operating system dependent. +\begin{note} +Pathnames ``.'' and ``..'' are relative paths. +\end{note} + +\pnum +A \defn{pathname} is +a character string that represents the name of a path. Pathnames are +formatted according to the generic pathname format grammar\iref{fs.path.generic} +or according to an +operating system dependent +\defn{native pathname format} accepted by the host operating system. + +\pnum +\defnx{Pathname resolution}{pathname resolution} +is the operating system dependent mechanism for resolving +a pathname to a particular file in a file hierarchy. There may be multiple +pathnames that resolve to the same file. +\begin{example} POSIX specifies the mechanism in section 4.11, Pathname resolution. +\end{example} + \begin{codeblock} namespace std::filesystem { class path { @@ -10690,15 +10644,28 @@ \end{ncbnf} \pnum +A \defn{filename} is +the name of a file. Filenames \grammarterm{dot} and \grammarterm{dot-dot}, +consisting solely of one and two period characters respectively, +have special meaning. +The following characteristics of filenames are operating system dependent: +\begin{itemize} +\item The permitted characters. \begin{example} Some operating systems prohibit + the ASCII control characters (0x00 -- 0x1F) in filenames. \end{example} \begin{note} -Operating systems often place restrictions -on the characters that may be used in a \grammarterm{filename}. For wide portability, users may wish to limit \grammarterm{filename} characters to the POSIX Portable Filename Character Set: \\ \tcode{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \tcode{a b c d e f g h i j k l m n o p q r s t u v w x y z} \\ \tcode{0 1 2 3 4 5 6 7 8 9 . _ -} \end{note} +\item The maximum permitted length. +\item Filenames that are not permitted. +\item Filenames that have special meaning. +\item Case awareness and sensitivity during path resolution. +\item Special rules that may apply to file types other than regular + files, such as directories. +\end{itemize} \pnum Except in a \grammarterm{root-name}, @@ -10706,15 +10673,15 @@ be the same as one \grammarterm{directory-separator} character. \pnum -The filename \grammarterm{dot}\iref{fs.def.filename} is treated as a reference to the current directory. -The filename \grammarterm{dot-dot}\iref{fs.def.filename} is treated as a reference to the parent directory. +The filename \grammarterm{dot} is treated as a reference to the current directory. +The filename \grammarterm{dot-dot} is treated as a reference to the parent directory. What the filename \grammarterm{dot-dot} refers to relative to \grammarterm{root-directory} is \impldef{meaning of \grammarterm{dot-dot} in \grammarterm{root-directory}}. Specific filenames may have special meanings for a particular operating system. \pnum A \grammarterm{root-name} identifies the -starting location for pathname resolution\iref{fs.def.pathres}. +starting location for pathname resolution\iref{fs.class.path}. If there are no operating system dependent \grammarterm{root-name}{s}, at least one \impldefrootname{} \grammarterm{root-name} is required. \begin{note} Many operating systems define a name @@ -10736,6 +10703,31 @@ without an intervening \grammarterm{root-directory} element. \end{note} +\pnum +\indextext{path!normalization|(}% +\defnx{Normalization}{normalization!path|see{path, normalization}} of a generic format pathname means: + +\begin{enumerate} +\item If the path is empty, stop. +\item Replace each slash character in the \grammarterm{root-name} with a \grammarterm{preferred-separator}. +\item Replace each \grammarterm{directory-separator} with a \grammarterm{preferred-separator}. +\begin{note} +The generic pathname grammar\iref{fs.path.generic} defines \grammarterm{directory-separator} as one or more slashes and \grammarterm{preferred-separator}{s}. +\end{note} +\item Remove each \grammarterm{dot} filename and any immediately following \grammarterm{directory-separator}. +\item As long as any appear, remove a non-\grammarterm{dot-dot} filename immediately followed by a \grammarterm{directory-separator} and a \grammarterm{dot-dot} filename, along with any immediately following \grammarterm{directory-separator}. +\item If there is a \grammarterm{root-directory}, remove all \grammarterm{dot-dot} filenames and any \grammarterm{directory-separator}{s} immediately following them. +\begin{note} +These \grammarterm{dot-dot} filenames attempt to refer to nonexistent parent directories. +\end{note} +\item If the last filename is \grammarterm{dot-dot}, remove any trailing \grammarterm{directory-separator}. +\item If the path is empty, add a \grammarterm{dot}. +\end{enumerate} + +The result of normalization is a path in \defnx{normal form}{normal form!path}, +which is said to be \term{normalized}. +\indextext{path!normalization|)}% + \rSec3[fs.path.cvt]{\tcode{path} conversions} \rSec4[fs.path.fmt.cvt]{\tcode{path} argument format conversions} @@ -10756,7 +10748,7 @@ Several functions are defined to accept \term{detected-format} arguments, which are character sequences. A detected-format argument represents a path using either a pathname in the generic format\iref{fs.path.generic} -or a pathname in the native format\iref{fs.def.native}. +or a pathname in the native format\iref{fs.class.path}. Such an argument is taken to be in the generic format if and only if it matches the generic format and is not acceptable to the operating system as a native path. @@ -10816,6 +10808,14 @@ \rSec4[fs.path.type.cvt]{\tcode{path} type and encoding conversions} +\pnum +The \defn{native encoding} of a narrow character string is +the operating system dependent current encoding +for pathnames\iref{fs.class.path}. +The \defn{native encoding} for wide character strings is +the implementation-defined execution +wide-character set encoding\iref{lex.charset}. + \pnum For member function arguments that take character sequences representing paths and for member functions returning strings, value type and encoding @@ -10825,7 +10825,7 @@ to be converted to is determined by its value type: \begin{itemize} -\item \tcode{char}: The encoding is the native narrow encoding\iref{fs.def.native.encode}. +\item \tcode{char}: The encoding is the native narrow encoding. The method of conversion, if any, is operating system dependent. \begin{note} For POSIX-based operating systems \tcode{path::value_type} is \tcode{char} @@ -10840,7 +10840,7 @@ strings to identify paths. Changing this behavior would be surprising and error prone. \end{note} -\item \tcode{wchar_t}: The encoding is the native wide encoding\iref{fs.def.native.encode}. +\item \tcode{wchar_t}: The encoding is the native wide encoding. The method of conversion is unspecified. \begin{note} For Windows-based operating systems \tcode{path::value_type} is \tcode{wchar_t} @@ -10995,7 +10995,7 @@ \begin{itemize} \item If \tcode{value_type} is \tcode{wchar_t}, converts to the native -wide encoding\iref{fs.def.native.encode} using the \tcode{codecvt<\brk{}wchar_t, char, mbstate_t>} +wide encoding\iref{fs.path.type.cvt} using the \tcode{codecvt<\brk{}wchar_t, char, mbstate_t>} facet of \tcode{loc}. \item Otherwise a conversion is performed using the @@ -11021,7 +11021,7 @@ For POSIX-based operating systems, the path is constructed by first using \tcode{latin1_facet} to convert ISO/IEC 8859-1 encoded \tcode{latin1_string} to a wide character string in the native wide -encoding\iref{fs.def.native.encode}. The resulting wide string is then +encoding\iref{fs.path.type.cvt}. The resulting wide string is then converted to a narrow character pathname string in the current native narrow encoding. If the native wide encoding is UTF-16 or UTF-32, and the current native narrow @@ -11377,7 +11377,7 @@ \rSec4[fs.path.native.obs]{\tcode{path} native format observers} \pnum -The string returned by all native format observers is in the native pathname format\iref{fs.def.native}. +The string returned by all native format observers is in the native pathname format\iref{fs.class.path}. \indexlibrarymember{native}{path}% \begin{itemdecl} @@ -11806,7 +11806,7 @@ \begin{itemdescr} \pnum \returns \tcode{true} if the pathname in the native format - contains an absolute path\iref{fs.def.absolute.path}, else \tcode{false}. + contains an absolute path\iref{fs.class.path}, else \tcode{false}. \pnum \begin{example} \tcode{path("/").is_absolute()} is @@ -11834,7 +11834,7 @@ \begin{itemdescr} \pnum \returns A path whose pathname in the generic format is -the normal form\iref{fs.def.normal.form} of the pathname +the normal form\iref{fs.path.generic} of the pathname in the generic format of \tcode{*this}. \pnum @@ -11858,8 +11858,8 @@ \begin{itemdescr} \pnum \returns \tcode{*this} made relative to \tcode{base}. -Does not resolve\iref{fs.def.pathres} symlinks. -Does not first normalize\iref{fs.def.normal.form} \tcode{*this} or \tcode{base}. +Does not resolve\iref{fs.class.path} symlinks. +Does not first normalize\iref{fs.path.generic} \tcode{*this} or \tcode{base}. \pnum \effects @@ -11908,7 +11908,7 @@ use the operational function \tcode{relative()}. \end{note} \pnum -\begin{note} If normalization\iref{fs.def.normal.form} is needed +\begin{note} If normalization\iref{fs.path.generic} is needed to ensure consistent matching of elements, apply \tcode{lexically_normal()} to \tcode{*this}, \tcode{base}, or both. \end{note} @@ -11929,7 +11929,7 @@ use the operational function \tcode{proximate()}. \end{note} \pnum -\begin{note} If normalization\iref{fs.def.normal.form} is needed +\begin{note} If normalization\iref{fs.path.generic} is needed to ensure consistent matching of elements, apply \tcode{lexically_normal()} to \tcode{*this}, \tcode{base}, or both. \end{note} @@ -12075,7 +12075,7 @@ which considers the two path's 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.def.pathres} to the same file system entity. +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} @@ -12164,7 +12164,7 @@ \returns \begin{itemize} \item If \tcode{value_type} is \tcode{char} and the current native - narrow encoding\iref{fs.def.native.encode} is UTF-8, + narrow encoding\iref{fs.path.type.cvt} is UTF-8, return \tcode{path(source)} or \tcode{path(first, last)}; otherwise, \item if \tcode{value_type} is \tcode{wchar_t} and the @@ -13720,7 +13720,7 @@ in external storage. \pnum -\begin{note} Because hardware failures, network failures, file system races\iref{fs.def.race}, +\begin{note} Because hardware failures, network failures, file system races\iref{fs.race.behavior}, and many other kinds of errors occur frequently in file system operations, users should be aware that any filesystem operation function, no matter how apparently innocuous, may encounter an error; see~\ref{fs.err.report}. \end{note} @@ -13783,7 +13783,7 @@ \begin{itemdescr} \pnum -\effects Converts \tcode{p}, which must exist, to an absolute +\effects Converts \tcode{p} to an absolute path that has no symbolic link, \grammarterm{dot}, or \grammarterm{dot-dot} elements in its pathname in the generic format. @@ -15198,7 +15198,7 @@ \begin{itemdescr} \pnum \returns \tcode{p} with symlinks resolved and - the result normalized\iref{fs.def.normal.form}. + the result normalized\iref{fs.path.generic}. \pnum \effects Using \tcode{status(p)} or \tcode{status(p, ec)}, respectively, @@ -15217,7 +15217,7 @@ \tcode{path()} is returned at the first error occurrence, if any. \pnum -\postconditions The returned path is in normal form\iref{fs.def.normal.form}. +\postconditions The returned path is in normal form\iref{fs.path.generic}. \pnum \remarks Implementations should diff --git a/source/iterators.tex b/source/iterators.tex index a3c4ed98fa..1336f8b90f 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -72,7 +72,7 @@ function template that takes iterators works as well with regular pointers. -This International Standard defines +This document defines five categories of iterators, according to the operations defined on them: \techterm{input iterators}, @@ -703,16 +703,19 @@ // \ref{iterator.operations}, iterator operations template - constexpr void advance(InputIterator& i, Distance n); + constexpr void + advance(InputIterator& i, Distance n); template constexpr typename iterator_traits::difference_type - distance(InputIterator first, InputIterator last); + distance(InputIterator first, InputIterator last); template - constexpr InputIterator next(InputIterator x, - typename iterator_traits::difference_type n = 1); + constexpr InputIterator + next(InputIterator x, + typename iterator_traits::difference_type n = 1); template - constexpr BidirectionalIterator prev(BidirectionalIterator x, - typename iterator_traits::difference_type n = 1); + constexpr BidirectionalIterator + prev(BidirectionalIterator x, + typename iterator_traits::difference_type n = 1); // \ref{predef.iterators}, predefined iterators template class reverse_iterator; @@ -1207,6 +1210,7 @@ constexpr reverse_iterator operator- (difference_type n) const; constexpr reverse_iterator& operator-=(difference_type n); constexpr @\unspecnc@ operator[](difference_type n) const; + protected: Iterator current; }; @@ -2630,6 +2634,7 @@ const T* operator->() const; istream_iterator& operator++(); istream_iterator operator++(int); + private: basic_istream* in_stream; // \expos T value; // \expos @@ -2847,6 +2852,7 @@ ostream_iterator& operator*(); ostream_iterator& operator++(); ostream_iterator& operator++(int); + private: basic_ostream* out_stream; // \expos const charT* delim; // \expos @@ -3015,6 +3021,7 @@ istreambuf_iterator& operator++(); proxy operator++(int); bool equal(const istreambuf_iterator& b) const; + private: streambuf_type* sbuf_; // \expos }; diff --git a/source/layout.tex b/source/layout.tex index b8e613a9d3..994241dc15 100644 --- a/source/layout.tex +++ b/source/layout.tex @@ -4,10 +4,8 @@ %%-------------------------------------------------- %% set page size, type block size, type block position -\setstocksize{11in}{8.5in} -\settrimmedsize{11in}{8.5in}{*} -\setlrmarginsandblock{1in}{1in}{*} -\setulmarginsandblock{1in}{*}{1.618} +\setlrmarginsandblock{2.245cm}{2.245cm}{*} +\setulmarginsandblock{2.5cm}{2.5cm}{*} %%-------------------------------------------------- %% set header and footer positions and sizes @@ -20,6 +18,12 @@ \setmarginnotes{7pt}{7pt}{0pt} \checkandfixthelayout +%%-------------------------------------------------- +%% If there is insufficient stretchable vertical space on a page, +%% TeX will not properly consider penalties for a good page break, +%% even if \raggedbottom (default) is in effect. +\addtolength{\topskip}{0pt plus 20pt} + %%-------------------------------------------------- %% Paragraph and bullet numbering diff --git a/source/lex.tex b/source/lex.tex index de222b019f..0d852ef93b 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -29,8 +29,8 @@ \indextext{conventions!lexical|(}% \indextext{compilation!separate|(}% The text of the program is kept in units called -\defnx{source files}{source file} in this International -Standard. A source file together with all the headers\iref{headers} +\defnx{source files}{source file} in this document. +A source file together with all the headers\iref{headers} and source files included\iref{cpp.include} via the preprocessing directive \tcode{\#include}, less any source lines skipped by any of the conditional inclusion\iref{cpp.cond} preprocessing directives, is @@ -819,7 +819,7 @@ \indextext{constant}% \indextext{literal!constant}% There are several kinds of literals.\footnote{The term ``literal'' generally designates, in this -International Standard, those tokens that are called ``constants'' in +document, those tokens that are called ``constants'' in ISO C. } \begin{bnf} diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 2b6082e46c..669f2e2990 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -117,9 +117,9 @@ The descriptions of many library functions rely on the C standard library for the semantics of those functions. In some cases, -the signatures specified in this International Standard +the signatures specified in this document may be different from the signatures in the C standard library, -and additional overloads may be declared in this International Standard, +and additional overloads may be declared in this document, but the behavior and the preconditions (including any preconditions implied by the use of an ISO C \tcode{restrict} qualifier) @@ -129,22 +129,26 @@ \pnum \begin{note} -\ref{intro.defs} defines additional terms used elsewhere in this International Standard. +\ref{intro.defs} defines additional terms used elsewhere in this document. \end{note} \definition{arbitrary-positional stream}{defns.arbitrary.stream} \indexdefn{stream!arbitrary-positional}% -a stream (described in \ref{input.output}) that can seek to any integral position within -the length of the stream\\ -\begin{note} Every arbitrary-positional stream is also a repositional stream. \end{note} +stream (described in \ref{input.output}) that can seek to any integral position within +the length of the stream + +\begin{defnote} +Every arbitrary-positional stream is also a repositional stream. +\end{defnote} \definition{character}{defns.character} \indexdefn{character}% \defncontext{\ref{strings}, \ref{localization}, \ref{input.output}, and~\ref{re}} -any object which, +object which, when treated sequentially, -can represent text\\ -\begin{note} +can represent text + +\begin{defnote} The term does not mean only \tcode{char}, \tcode{char16_t}, @@ -154,29 +158,30 @@ objects, but any value that can be represented by a type that provides the definitions specified in these Clauses. -\end{note} +\end{defnote} \definition{character container type}{defns.character.container} \indexdefn{type!character container}% -a class or a type used to -represent a -\term{character}\\ -\begin{note} +class or a type used to +represent a character + +\begin{defnote} It is used for one of the template parameters of the string, iostream, and regular expression class templates. A character container type is a POD\iref{basic.types} type. -\end{note} +\end{defnote} \definition{comparison function}{defns.comparison} \indexdefn{function!comparison}% -an operator function\iref{over.oper} for any of the equality\iref{expr.eq} or +operator function\iref{over.oper} for any of the equality\iref{expr.eq} or relational\iref{expr.rel} operators \definition{component}{defns.component} \indexdefn{component}% -a group of library entities directly related as members, parameters, or -return types\\ -\begin{note} +group of library entities directly related as members, parameters, or +return types + +\begin{defnote} For example, the class template \tcode{basic_string} and the non-member @@ -184,31 +189,32 @@ that operate on strings are referred to as the \term{string component}. -\end{note} +\end{defnote} \definition{constant subexpression}{defns.const.subexpr} \indexdefn{constant subexpression}% -an expression whose evaluation as subexpression of a +expression whose evaluation as subexpression of a \grammarterm{conditional-expression} \tcode{CE}\iref{expr.cond} would not prevent \tcode{CE} from being a core constant expression\iref{expr.const} \definition{deadlock}{defns.deadlock} \indexdefn{deadlock}% +situation wherein one or more threads are unable to continue execution because each is blocked waiting for one or more of the others to satisfy some condition \definition{default behavior}{defns.default.behavior.impl} \indexdefn{behavior!default}% \defncontext{implementation} -any specific behavior provided by the implementation, +specific behavior provided by the implementation, within the scope of the \term{required behavior} \definition{default behavior}{defns.default.behavior.func} \indexdefn{behavior!default}% \defncontext{specification} -a description of +description of \term{replacement function} and \term{handler function} @@ -216,24 +222,25 @@ \definition{direct-non-list-initialization}{defns.direct-non-list-init} \indexdefn{direct-non-list-initialization}% -a direct-initialization\iref{dcl.init} +direct-initialization\iref{dcl.init} that is not list-initialization\iref{dcl.init.list} \definition{handler function}{defns.handler} \indexdefn{function!handler}% -a \term{non-reserved function} -whose definition may be provided by a \Cpp program\\ -\begin{note} +whose definition may be provided by a \Cpp program + +\begin{defnote} A \Cpp program may designate a handler function at various points in its execution by supplying a pointer to the function when calling any of the library functions that install handler functions\iref{language.support}. -\end{note} +\end{defnote} \definition{iostream class templates}{defns.iostream.templates} templates, defined in \ref{input.output}, -that take two template arguments\\ -\begin{note} +that take two template arguments + +\begin{defnote} The arguments are named \tcode{charT} and @@ -247,11 +254,11 @@ of the character type represented by \tcode{charT} necessary to implement the iostream class templates. -\end{note} +\end{defnote} \definition{modifier function}{defns.modifier} \indexdefn{function!modifier}% -a class member function\iref{class.mfct} other than a constructor, +class member function\iref{class.mfct} other than a constructor, assignment operator, or destructor that alters the state of an object of the class @@ -266,89 +273,102 @@ \definition{NTCTS}{defns.ntcts} \indexdefn{NTCTS}% \indexdefn{string!null-terminated character type}% -a sequence of values that have -\term{character type} +sequence of values that have +character type that precede the terminating null character type value \tcode{charT()} \definition{observer function}{defns.observer} \indexdefn{function!observer}% -a class member function\iref{class.mfct} that accesses the state of an object of the class -but does not alter that state\\ -\begin{note} +class member function\iref{class.mfct} that accesses the state of an object of the class +but does not alter that state + +\begin{defnote} Observer functions are specified as \tcode{const} member functions\iref{class.this}. -\end{note} +\end{defnote} \definition{referenceable type}{defns.referenceable} \indexdefn{type!referenceable}% +type that is either an an object type, a function type that does not have cv-qualifiers or a \grammarterm{ref-qualifier}, or a reference type -\begin{note} The term describes a type to which a reference can be created, -including reference types. \end{note} + +\begin{defnote} +The term describes a type to which a reference can be created, +including reference types. +\end{defnote} \definition{replacement function}{defns.replacement} \indexdefn{function!replacement}% -a -\term{non-reserved function} -whose definition is provided by a \Cpp program\\ -\begin{note} +non-reserved function +whose definition is provided by a \Cpp program + +\begin{defnote} Only one definition for such a function is in effect for the duration of the program's execution, as the result of creating the program\iref{lex.phases} and resolving the definitions of all translation units\iref{basic.link}. -\end{note} +\end{defnote} \definition{repositional stream}{defns.repositional.stream} \indexdefn{stream!repositional}% -a stream (described in \ref{input.output}) that can seek to a position that was +stream (described in \ref{input.output}) that can seek to a position that was previously encountered \definition{required behavior}{defns.required.behavior} \indexdefn{behavior!required}% -a description of +description of \term{replacement function} and \term{handler function} semantics applicable to both the behavior provided by the implementation and -the behavior of any such function definition in the program\\ -\begin{note} +the behavior of any such function definition in the program + +\begin{defnote} If such a function defined in a \Cpp program fails to meet the required behavior when it executes, the behavior is undefined.% \indextext{undefined} -\end{note} +\end{defnote} \definition{reserved function}{defns.reserved.function} \indexdefn{function!reserved}% -a function, specified as part of the \Cpp standard library, that must be defined by the -implementation\\ -\begin{note} +function, specified as part of the \Cpp standard library, that is defined by the +implementation + +\begin{defnote} If a \Cpp program provides a definition for any reserved function, the results are undefined.% \indextext{undefined} -\end{note} +\end{defnote} \definition{stable algorithm}{defns.stable} \indexdefn{algorithm!stable}% \indexdefn{stable algorithm}% -an algorithm that preserves, as appropriate to the particular algorithm, the order -of elements\\ -\begin{note} Requirements for stable algorithms are given in~\ref{algorithm.stable}. \end{note} +algorithm that preserves, as appropriate to the particular algorithm, the order +of elements + +\begin{defnote} +Requirements for stable algorithms are given in \ref{algorithm.stable}. +\end{defnote} \definition{traits class}{defns.traits} \indexdefn{traits}% -a class that encapsulates a set of types and functions necessary for class templates and +class that encapsulates a set of types and functions necessary for class templates and function templates to manipulate objects of types for which they are instantiated \definition{valid but unspecified state}{defns.valid} \indexdefn{valid but unspecified state}% -a value of an object that is not specified except that the object's invariants are -met and operations on the object behave as specified for its type\\ -\begin{example} If an object \tcode{x} of type \tcode{std::vector} is in a +value of an object that is not specified except that the object's invariants are +met and operations on the object behave as specified for its type + +\begin{example} +If an object \tcode{x} of type \tcode{std::vector} is in a valid but unspecified state, \tcode{x.empty()} can be called unconditionally, and \tcode{x.front()} can be called only if \tcode{x.empty()} returns -\tcode{false}. \end{example} +\tcode{false}. +\end{example} \rSec1[description]{Method of description (Informative)} @@ -535,7 +555,7 @@ \pnum Paragraphs labeled ``\xref'' contain cross-references to the relevant portions -of this International Standard and the ISO C standard. +of the ISO C standard. \rSec2[conventions]{Other conventions} \indextext{conventions}% @@ -1259,7 +1279,7 @@ \defnx{hosted}{implementation!hosted} and \term{freestanding}\iref{intro.compliance}. -For a hosted implementation, this International Standard +For a hosted implementation, this document describes the set of available headers. \pnum @@ -1804,8 +1824,6 @@ \tcode{args} & a function parameter pack with the pattern \tcode{Args\&\&} \\ \end{libreqtab2} -\newpage - \begin{libreqtab4d} {Allocator requirements} {tab:utilities.allocator.requirements} @@ -1886,7 +1904,11 @@ \tcode{a.allocate(n)} & \tcode{X::pointer} & Memory is allocated for \tcode{n} objects of type \tcode{T} but objects -are not constructed. \tcode{allocate} may throw an appropriate exception.\footnotemark +are not constructed. \tcode{allocate} may throw an appropriate exception.% +\footnote{It is intended that \tcode{a.allocate} be an efficient means +of allocating a single object of type \tcode{T}, even when \tcode{sizeof(T)} +is small. That is, there is no need for a container to maintain its own +free list.} \begin{note} If \tcode{n == 0}, the return value is unspecified. \end{note} & \\ \rowsep @@ -1996,11 +2018,6 @@ \end{libreqtab4d} -\footnotetext{It is intended that \tcode{a.allocate} be an efficient means -of allocating a single object of type \tcode{T}, even when \tcode{sizeof(T)} -is small. That is, there is no need for a container to maintain its own -free list.} - \pnum Note A: The member class template \tcode{rebind} in the table above is effectively a typedef template. \begin{note} In general, if @@ -2160,7 +2177,7 @@ for the original template and is not explicitly prohibited.\footnote{Any library code that instantiates other library templates must be prepared to work adequately with any user-supplied specialization -that meets the minimum requirements of this International Standard.} +that meets the minimum requirements of this document.} \pnum The behavior of a \Cpp program is undefined @@ -2525,7 +2542,7 @@ In certain cases (replacement functions, handler functions, operations on types used to instantiate standard library template components), the \Cpp standard library depends on components supplied by a \Cpp program. -If these components do not meet their requirements, this International Standard places no requirements +If these components do not meet their requirements, this document places no requirements on the implementation. \pnum @@ -2736,7 +2753,7 @@ For a non-virtual member function described in the \Cpp standard library, an implementation may declare a different set of member function signatures, provided that any call to the member function that would select -an overload from the set of declarations described in this International Standard +an overload from the set of declarations described in this document behaves as if that overload were selected. \begin{note} For instance, an implementation may add parameters with default values, @@ -2748,7 +2765,7 @@ \rSec3[constexpr.functions]{Constexpr functions and constructors} \pnum -This International Standard explicitly requires that certain standard library functions are +This document explicitly requires that certain standard library functions are \tcode{constexpr}\iref{dcl.constexpr}. An implementation shall not declare any standard library function signature as \tcode{constexpr} except for those where it is explicitly required. @@ -2779,7 +2796,7 @@ \rSec3[reentrancy]{Reentrancy} \pnum -Except where explicitly specified in this International Standard, it is \impldef{which functions in +Except where explicitly specified in this document, it is \impldef{which functions in the \Cpp standard library may be recursively reentered} which functions in the \Cpp standard library may be recursively reentered. diff --git a/source/locales.tex b/source/locales.tex index de5297bbfd..0070fcd7e7 100644 --- a/source/locales.tex +++ b/source/locales.tex @@ -112,8 +112,6 @@ \indexlibrary{\idxhdr{ctime}}% \tcode{}.} -\newpage - \rSec1[locales]{Locales} \rSec2[locale]{Class \tcode{locale}} @@ -149,7 +147,7 @@ template locale combine(const locale& other) const; // locale operations: - basic_string name() const; + basic_string name() const; bool operator==(const locale& other) const; bool operator!=(const locale& other) const; @@ -1075,7 +1073,7 @@ \tcode{put()} members make no provision for error reporting. (Any failures of the -OutputIterator argument must be extracted from the returned iterator.) +OutputIterator argument can be extracted from the returned iterator.) The \tcode{get()} members take an @@ -3926,7 +3924,7 @@ \remarks It is unspecified whether multiple calls to \tcode{do_get()} with the address of the same \tcode{struct tm} object will update the current contents of -the object or simply overwrite its members. Portable programs must zero +the object or simply overwrite its members. Portable programs should zero out the object before invoking the function. \pnum diff --git a/source/macros.tex b/source/macros.tex index b6342dd780..a30a7efe8f 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -348,7 +348,9 @@ % italics. Arbitrary TeX commands can be used if they're % surrounded by @ signs. \newcommand{\CodeBlockSetup}{ - \lstset{escapechar=@, aboveskip=\parskip, belowskip=0pt} + \lstset{escapechar=@, aboveskip=\parskip, belowskip=0pt, + midpenalty=500, endpenalty=-50, + emptylinepenalty=-250, semicolonpenalty=0} \renewcommand{\tcode}[1]{\textup{\CodeStylex{##1}}} \renewcommand{\techterm}[1]{\textit{\CodeStylex{##1}}} \renewcommand{\term}[1]{\textit{##1}} @@ -381,6 +383,9 @@ { \lstset{escapechar=@, xleftmargin=0em, + midpenalty=500, + semicolonpenalty=-50, + endpenalty=3000, aboveskip=2ex, belowskip=0ex % leave this alone: it keeps these things out of the % footnote area @@ -391,7 +396,7 @@ \newenvironment{itemdescr} { - \begin{indented}} + \begin{indented}[beginpenalty=3000, endpenalty=-300]} { \end{indented} } @@ -531,9 +536,11 @@ %%-------------------------------------------------- %% Definitions section for "Terms and definitions" +\newcounter{termnote} \newcommand{\nocontentsline}[3]{} \newcommand{\definition}[2]{% \addxref{#2}% +\setcounter{termnote}{0}% \let\oldcontentsline\addcontentsline% \let\addcontentsline\nocontentsline% \ifcase\value{SectionDepth} @@ -547,3 +554,4 @@ \let\addcontentsline\oldcontentsline% } \newcommand{\defncontext}[1]{\textlangle#1\textrangle} +\newenvironment{defnote}{\addtocounter{termnote}{1}\noteintro{Note \thetermnote{} to entry}}{\noteoutro{note}\xspace} diff --git a/source/numerics.tex b/source/numerics.tex index a4cd5ec728..7cc2e2aec5 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -219,7 +219,7 @@ The contents and meaning of the header \tcode{} are the same as the C standard library header \tcode{}. \begin{note} -This International Standard does not require an implementation to support the +This document does not require an implementation to support the \tcode{FENV_ACCESS} pragma; it is \impldef{whether pragma \tcode{FENV_ACCESS} is supported}\iref{cpp.pragma} whether the pragma is supported. As a consequence, @@ -227,7 +227,7 @@ whether these functions can be used to test floating-point status flags, set floating-point control modes, or run under non-default mode settings. If the pragma is used to enable control over the floating-point environment, -this International Standard does not specify the effect on +this document does not specify the effect on floating-point evaluation in constant expressions. \end{note} @@ -331,12 +331,10 @@ template constexpr bool operator!=(const T&, const complex&); template - basic_istream& - operator>>(basic_istream&, complex&); + basic_istream& operator>>(basic_istream&, complex&); template - basic_ostream& - operator<<(basic_ostream&, const complex&); + basic_ostream& operator<<(basic_ostream&, const complex&); // \ref{complex.value.ops}, values template constexpr T real(const complex&); @@ -377,14 +375,14 @@ // \ref{complex.literals}, complex literals inline namespace literals { - inline namespace complex_literals { - constexpr complex operator""il(long double); - constexpr complex operator""il(unsigned long long); - constexpr complex operator""i(long double); - constexpr complex operator""i(unsigned long long); - constexpr complex operator""if(long double); - constexpr complex operator""if(unsigned long long); - } + inline namespace complex_literals { + constexpr complex operator""il(long double); + constexpr complex operator""il(unsigned long long); + constexpr complex operator""i(long double); + constexpr complex operator""i(unsigned long long); + constexpr complex operator""if(long double); + constexpr complex operator""if(unsigned long long); + } } } \end{codeblock} @@ -394,8 +392,7 @@ \indexlibrary{\idxcode{complex}}% \begin{codeblock} namespace std { - template - class complex { + template class complex { public: using value_type = T; @@ -848,8 +845,7 @@ \indexlibrarymember{operator>>}{complex}% \begin{itemdecl} template -basic_istream& -operator>>(basic_istream& is, complex& x); + basic_istream& operator>>(basic_istream& is, complex& x); \end{itemdecl} \begin{itemdescr} @@ -892,8 +888,7 @@ \indexlibrarymember{operator<<}{complex}% \begin{itemdecl} template -basic_ostream& -operator<<(basic_ostream& o, const complex& x); + basic_ostream& operator<<(basic_ostream& o, const complex& x); \end{itemdecl} \begin{itemdescr} @@ -6421,7 +6416,7 @@ \begin{note} \indexlibrary{\idxcode{rand}!discouraged}% The other random -number generation facilities in this International Standard\iref{rand} are often preferable +number generation facilities in this document\iref{rand} are often preferable to \tcode{rand}, because \tcode{rand}'s underlying algorithm is unspecified. Use of \tcode{rand} therefore continues to be non-portable, with unpredictable and oft-questionable quality and performance. @@ -6501,29 +6496,23 @@ template valarray operator||(const valarray&, const T&); template valarray operator||(const T&, const valarray&); - template - valarray operator==(const valarray&, const valarray&); + template valarray operator==(const valarray&, const valarray&); template valarray operator==(const valarray&, const T&); template valarray operator==(const T&, const valarray&); - template - valarray operator!=(const valarray&, const valarray&); + template valarray operator!=(const valarray&, const valarray&); template valarray operator!=(const valarray&, const T&); template valarray operator!=(const T&, const valarray&); - template - valarray operator< (const valarray&, const valarray&); + template valarray operator< (const valarray&, const valarray&); template valarray operator< (const valarray&, const T&); template valarray operator< (const T&, const valarray&); - template - valarray operator> (const valarray&, const valarray&); + template valarray operator> (const valarray&, const valarray&); template valarray operator> (const valarray&, const T&); template valarray operator> (const T&, const valarray&); - template - valarray operator<=(const valarray&, const valarray&); + template valarray operator<=(const valarray&, const valarray&); template valarray operator<=(const valarray&, const T&); template valarray operator<=(const T&, const valarray&); - template - valarray operator>=(const valarray&, const valarray&); + template valarray operator>=(const valarray&, const valarray&); template valarray operator>=(const valarray&, const T&); template valarray operator>=(const T&, const valarray&); @@ -7049,7 +7038,7 @@ template object which has reference semantics to the original array, working in conjunction with various overloads of \tcode{operator=} and other assigning operators to allow selective replacement (slicing) of the controlled sequence. -In each case the selected element(s) must exist. +In each case the selected element(s) shall exist. \indexlibrarymember{operator[]}{valarray}% \begin{itemdecl} @@ -7504,26 +7493,16 @@ \indexlibrarymember{operator<<}{valarray}% \indexlibrarymember{operator>>}{valarray}% \begin{itemdecl} -template valarray operator* - (const valarray&, const valarray&); -template valarray operator/ - (const valarray&, const valarray&); -template valarray operator% - (const valarray&, const valarray&); -template valarray operator+ - (const valarray&, const valarray&); -template valarray operator- - (const valarray&, const valarray&); -template valarray operator^ - (const valarray&, const valarray&); -template valarray operator& - (const valarray&, const valarray&); -template valarray operator| - (const valarray&, const valarray&); -template valarray operator<< - (const valarray&, const valarray&); -template valarray operator>> - (const valarray&, const valarray&); +template valarray operator* (const valarray&, const valarray&); +template valarray operator/ (const valarray&, const valarray&); +template valarray operator% (const valarray&, const valarray&); +template valarray operator+ (const valarray&, const valarray&); +template valarray operator- (const valarray&, const valarray&); +template valarray operator^ (const valarray&, const valarray&); +template valarray operator& (const valarray&, const valarray&); +template valarray operator| (const valarray&, const valarray&); +template valarray operator<<(const valarray&, const valarray&); +template valarray operator>>(const valarray&, const valarray&); \end{itemdecl} \begin{itemdescr} @@ -7605,22 +7584,14 @@ \indexlibrarymember{operator\&\&}{valarray}% \indexlibrarymember{operator"|"|}{valarray}% \begin{itemdecl} -template valarray operator== - (const valarray&, const valarray&); -template valarray operator!= - (const valarray&, const valarray&); -template valarray operator< - (const valarray&, const valarray&); -template valarray operator> - (const valarray&, const valarray&); -template valarray operator<= - (const valarray&, const valarray&); -template valarray operator>= - (const valarray&, const valarray&); -template valarray operator&& - (const valarray&, const valarray&); -template valarray operator|| - (const valarray&, const valarray&); +template valarray operator==(const valarray&, const valarray&); +template valarray operator!=(const valarray&, const valarray&); +template valarray operator< (const valarray&, const valarray&); +template valarray operator> (const valarray&, const valarray&); +template valarray operator<=(const valarray&, const valarray&); +template valarray operator>=(const valarray&, const valarray&); +template valarray operator&&(const valarray&, const valarray&); +template valarray operator||(const valarray&, const valarray&); \end{itemdecl} \begin{itemdescr} @@ -7709,8 +7680,7 @@ template valarray acos (const valarray&); template valarray asin (const valarray&); template valarray atan (const valarray&); -template valarray atan2 - (const valarray&, const valarray&); +template valarray atan2(const valarray&, const valarray&); template valarray atan2(const valarray&, const T&); template valarray atan2(const T&, const valarray&); template valarray cos (const valarray&); @@ -7718,8 +7688,7 @@ template valarray exp (const valarray&); template valarray log (const valarray&); template valarray log10(const valarray&); -template valarray pow - (const valarray&, const valarray&); +template valarray pow (const valarray&, const valarray&); template valarray pow (const valarray&, const T&); template valarray pow (const T&, const valarray&); template valarray sin (const valarray&); @@ -8577,8 +8546,7 @@ template T accumulate(InputIterator first, InputIterator last, T init); template - T accumulate(InputIterator first, InputIterator last, T init, - BinaryOperation binary_op); + T accumulate(InputIterator first, InputIterator last, T init, BinaryOperation binary_op); // \ref{reduce}, reduce template @@ -8587,8 +8555,7 @@ template T reduce(InputIterator first, InputIterator last, T init); template - T reduce(InputIterator first, InputIterator last, T init, - BinaryOperation binary_op); + T reduce(InputIterator first, InputIterator last, T init, BinaryOperation binary_op); template typename iterator_traits::value_type reduce(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads} @@ -8598,8 +8565,7 @@ ForwardIterator first, ForwardIterator last, T init); template T reduce(ExecutionPolicy&& exec, // see \ref{algorithms.parallel.overloads} - ForwardIterator first, ForwardIterator last, T init, - BinaryOperation binary_op); + ForwardIterator first, ForwardIterator last, T init, BinaryOperation binary_op); // \ref{inner.product}, inner product template @@ -9198,8 +9164,7 @@ \begin{itemdecl} template OutputIterator exclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, - T init); + OutputIterator result, T init); \end{itemdecl} \begin{itemdescr} @@ -9215,8 +9180,7 @@ template ForwardIterator2 exclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, - ForwardIterator2 result, - T init); + ForwardIterator2 result, T init); \end{itemdecl} \begin{itemdescr} @@ -9233,14 +9197,12 @@ \begin{itemdecl} template OutputIterator exclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, - T init, BinaryOperation binary_op); + OutputIterator result, T init, BinaryOperation binary_op); template ForwardIterator2 exclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, - ForwardIterator2 result, - T init, BinaryOperation binary_op); + ForwardIterator2 result, T init, BinaryOperation binary_op); \end{itemdecl} \begin{itemdescr} @@ -9289,8 +9251,7 @@ \indexlibrary{\idxcode{inclusive_scan}}% \begin{itemdecl} template - OutputIterator inclusive_scan(InputIterator first, InputIterator last, - OutputIterator result); + OutputIterator inclusive_scan(InputIterator first, InputIterator last, OutputIterator result); \end{itemdecl} \begin{itemdescr} @@ -9322,25 +9283,21 @@ \begin{itemdecl} template OutputIterator inclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, - BinaryOperation binary_op); + OutputIterator result, BinaryOperation binary_op); template ForwardIterator2 inclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, - ForwardIterator2 result, - BinaryOperation binary_op); + ForwardIterator2 result, BinaryOperation binary_op); template OutputIterator inclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, - BinaryOperation binary_op, T init); + OutputIterator result, BinaryOperation binary_op, T init); template ForwardIterator2 inclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, - ForwardIterator2 result, - BinaryOperation binary_op, T init); + ForwardIterator2 result, BinaryOperation binary_op, T init); \end{itemdecl} \begin{itemdescr} @@ -9402,19 +9359,15 @@ template OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, - T init, - BinaryOperation binary_op, - UnaryOperation unary_op); + OutputIterator result, T init, + BinaryOperation binary_op,UnaryOperation unary_op); template ForwardIterator2 transform_exclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, - ForwardIterator2 result, - T init, - BinaryOperation binary_op, - UnaryOperation unary_op); + ForwardIterator2 result, T init, + BinaryOperation binary_op, UnaryOperation unary_op); \end{itemdecl} \begin{itemdescr} @@ -9477,22 +9430,19 @@ class BinaryOperation, class UnaryOperation> OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, - BinaryOperation binary_op, - UnaryOperation unary_op); + BinaryOperation binary_op, UnaryOperation unary_op); template ForwardIterator2 transform_inclusive_scan(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, - BinaryOperation binary_op, - UnaryOperation unary_op); + BinaryOperation binary_op, UnaryOperation unary_op); template OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, - BinaryOperation binary_op, - UnaryOperation unary_op, + BinaryOperation binary_op, UnaryOperation unary_op, T init); template OutputIterator - adjacent_difference(InputIterator first, InputIterator last, - OutputIterator result); + adjacent_difference(InputIterator first, InputIterator last, OutputIterator result); template ForwardIterator2 adjacent_difference(ExecutionPolicy&& exec, - ForwardIterator1 first, ForwardIterator1 last, - ForwardIterator2 result); + ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result); template OutputIterator adjacent_difference(InputIterator first, InputIterator last, - OutputIterator result, - BinaryOperation binary_op); + OutputIterator result, BinaryOperation binary_op); template ForwardIterator2 adjacent_difference(ExecutionPolicy&& exec, ForwardIterator1 first, ForwardIterator1 last, - ForwardIterator2 result, - BinaryOperation binary_op); + ForwardIterator2 result, BinaryOperation binary_op); \end{itemdecl} \begin{itemdescr} @@ -9673,7 +9618,7 @@ \pnum \requires \tcode{T} shall be convertible to \tcode{ForwardIterator}'s value type. The expression \tcode{++val}, where \tcode{val} has type \tcode{T}, shall -be well formed. +be well-formed. \pnum \effects For each element referred to by the iterator \tcode{i} in the range @@ -10504,7 +10449,7 @@ a three-dimensional hypotenuse function~(\ref{c.math.hypot3}) and the mathematical special functions described in \ref{sf.cmath}. \begin{note} -Several functions have additional overloads in this International Standard, +Several functions have additional overloads in this document, but they have the same behavior as in the C standard library\iref{library.c}. \end{note} diff --git a/source/overloading.tex b/source/overloading.tex index 64eee93e98..b8e349ac8f 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -294,7 +294,7 @@ void prog () { f (1, 2); // OK: call \tcode{f(int, int)} f (1); // OK: call \tcode{f(int, int)} - f (); // Error: \tcode{f(int, int)} or \tcode{f()}? + f (); // error: \tcode{f(int, int)} or \tcode{f()}? } \end{codeblock} \end{example} @@ -483,7 +483,7 @@ \pnum The subclauses of~\ref{over.match.funcs} describe the set of candidate functions and the argument list submitted to -overload resolution in each of the seven contexts in which +overload resolution in each context in which overload resolution is used. The source transformations and constructions defined in these subclauses are only for the purpose of describing the @@ -713,10 +713,10 @@ has type ``\cv{}~\tcode{T}'' where \tcode{T} -denotes a class\footnote{Note that cv-qualifiers on the type of objects are +denotes a class.\footnote{Note that cv-qualifiers on the type of objects are significant in overload resolution for -both glvalue and class prvalue objects.}. +both glvalue and class prvalue objects.} Under this assumption, the \grammarterm{id-expression} @@ -775,7 +775,7 @@ a contrived object of type \tcode{T} becomes the implied object -argument\footnote{An implied object argument must be contrived to +argument.\footnote{An implied object argument must be contrived to correspond to the implicit object parameter attributed to member functions during overload resolution. It is not @@ -785,7 +785,7 @@ same implicit object parameter, the contrived object will not be the cause to select or reject a -function.}. +function.} If the argument list is augmented by a contrived object and overload resolution selects one of the non-static member functions of \tcode{T}, @@ -848,7 +848,7 @@ provided the function is not hidden within \tcode{T} by another -intervening declaration\footnote{Note that this construction can yield +intervening declaration.\footnote{Note that this construction can yield candidate call functions that cannot be differentiated one from the other by overload resolution because they have identical @@ -856,7 +856,7 @@ The call will be ambiguous if overload resolution cannot select a match to the call that is uniquely better than such -undifferentiable functions.}. +undifferentiable functions.} \pnum If such a surrogate call function is selected by overload @@ -1466,8 +1466,8 @@ \begin{example} \begin{codeblock} template struct A { - explicit A(const T&, ...) noexcept; // \#1 - A(T&&, ...); // \#2 + explicit A(const T&, ...) noexcept; // \#1 + A(T&&, ...); // \#2 }; int i; @@ -1713,7 +1713,7 @@ }; int main() { - B b; // OK, \tcode{B::B()} + B b; // OK, \tcode{B::B()} } \end{codeblock} \end{example} @@ -1840,7 +1840,7 @@ void use() { f(3); // OK, default argument was not used for viability - f(); // Error: found default argument twice + f(); // error: found default argument twice } \end{codeblock} \end{example} @@ -2232,15 +2232,15 @@ \begin{codeblock} struct A { int x, y; }; struct B { int y, x; }; -void f(A a, int); // \#1 -void f(B b, ...); // \#2 -void g(A a); // \#3 -void g(B b); // \#4 +void f(A a, int); // \#1 +void f(B b, ...); // \#2 +void g(A a); // \#3 +void g(B b); // \#4 void h() { - f({.x = 1, .y = 2}, 0); // OK; calls \#1 - f({.y = 2, .x = 1}, 0); // error: selects \#1, initialization of \tcode{a} fails - // due to non-matching member order\iref{dcl.init.list} - g({.x = 1, .y = 2}); // error: ambiguous between \#3 and \#4 + f({.x = 1, .y = 2}, 0); // OK; calls \#1 + f({.y = 2, .x = 1}, 0); // error: selects \#1, initialization of \tcode{a} fails + // due to non-matching member order\iref{dcl.init.list} + g({.x = 1, .y = 2}); // error: ambiguous between \#3 and \#4 } \end{codeblock} \end{example} @@ -2271,24 +2271,24 @@ the context of a call to an initializer-list constructor. \begin{example} \begin{codeblock} void f(std::initializer_list); -f( {} ); // OK: \tcode{f(initializer_list)} identity conversion -f( {1,2,3} ); // OK: \tcode{f(initializer_list)} identity conversion -f( {'a','b'} ); // OK: \tcode{f(initializer_list)} integral promotion -f( {1.0} ); // error: narrowing +f( {} ); // OK: \tcode{f(initializer_list)} identity conversion +f( {1,2,3} ); // OK: \tcode{f(initializer_list)} identity conversion +f( {'a','b'} ); // OK: \tcode{f(initializer_list)} integral promotion +f( {1.0} ); // error: narrowing struct A { A(std::initializer_list); // \#1 A(std::initializer_list>); // \#2 A(std::initializer_list); // \#3 }; -A a{ 1.0,2.0 }; // OK, uses \#1 +A a{ 1.0,2.0 }; // OK, uses \#1 void g(A); -g({ "foo", "bar" }); // OK, uses \#3 +g({ "foo", "bar" }); // OK, uses \#3 typedef int IA[3]; void h(const IA&); -h({ 1, 2, 3 }); // OK: identity conversion +h({ 1, 2, 3 }); // OK: identity conversion \end{codeblock} \end{example} @@ -3304,9 +3304,9 @@ Z operator[](std::initializer_list); }; X x; -x[{1,2,3}] = 7; // OK: meaning \tcode{x.operator[](\{1,2,3\})} +x[{1,2,3}] = 7; // OK: meaning \tcode{x.operator[](\{1,2,3\})} int a[10]; -a[{1,2,3}] = 7; // error: built-in subscript operator +a[{1,2,3}] = 7; // error: built-in subscript operator \end{codeblock} \end{example} diff --git a/source/regex.tex b/source/regex.tex index 5e8ce03675..3320472cb6 100644 --- a/source/regex.tex +++ b/source/regex.tex @@ -4164,7 +4164,7 @@ The behavior of the internal finite state machine representation when used to match a sequence of characters is as described in ECMA-262. The behavior is modified according -to any match_flag_type flags\iref{re.matchflag} specified when using the regular expression +to any \tcode{match_flag_type} flags\iref{re.matchflag} specified when using the regular expression object in one of the regular expression algorithms\iref{re.alg}. The behavior is also localized by interaction with the traits class template parameter as follows: \begin{itemize} diff --git a/source/special.tex b/source/special.tex index c780f8dd48..de6f9f6c47 100644 --- a/source/special.tex +++ b/source/special.tex @@ -40,7 +40,7 @@ B& operator=(const B &); }; B& B::operator=(const B& s) { - this->A::operator=(s); // well formed + this->A::operator=(s); // well-formed return *this; } \end{codeblock} @@ -2814,7 +2814,7 @@ \indextext{copy!class object|see{assignment operator, copy}}% \indextext{move!class object|see{assignment operator, move}}% \indextext{operator!copy assignment|see{assignment operator, copy}}% -\indextext{operator!move assignment|see{assignment operator, move}} +\indextext{operator!move assignment|see{assignment operator, move}}% A user-declared \term{copy} assignment operator \tcode{X::operator=} is a non-static non-template member function of class \tcode{X} with exactly one parameter of type \tcode{X}, \tcode{X\&}, \tcode{const} \tcode{X\&}, diff --git a/source/std.tex b/source/std.tex index e77b5a1f82..555099919e 100644 --- a/source/std.tex +++ b/source/std.tex @@ -3,9 +3,7 @@ %%-------------------------------------------------- %% basics -% \documentclass[letterpaper,oneside,openany]{memoir} -\documentclass[ebook,10pt,oneside,openany,final]{memoir} -% \includeonly{declarations} +\documentclass[a4paper,10pt,oneside,openany,final]{memoir} \usepackage[american] {babel} % needed for iso dates diff --git a/source/strings.tex b/source/strings.tex index 8ee9d010a9..5ed4a61ae7 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -634,10 +634,12 @@ basic_string&& rhs); template basic_string - operator+(charT lhs, const basic_string& rhs); + operator+(charT lhs, + const basic_string& rhs); template basic_string - operator+(charT lhs, basic_string&& rhs); + operator+(charT lhs, + basic_string&& rhs); template basic_string operator+(const basic_string& lhs, @@ -648,10 +650,12 @@ const charT* rhs); template basic_string - operator+(const basic_string& lhs, charT rhs); + operator+(const basic_string& lhs, + charT rhs); template basic_string - operator+(basic_string&& lhs, charT rhs); + operator+(basic_string&& lhs, + charT rhs); template bool operator==(const basic_string& lhs, @@ -896,22 +900,17 @@ explicit basic_string(const Allocator& a) noexcept; basic_string(const basic_string& str); basic_string(basic_string&& str) noexcept; - basic_string(const basic_string& str, size_type pos, - const Allocator& a = Allocator()); + basic_string(const basic_string& str, size_type pos, const Allocator& a = Allocator()); basic_string(const basic_string& str, size_type pos, size_type n, const Allocator& a = Allocator()); template - basic_string(const T& t, size_type pos, size_type n, - const Allocator& a = Allocator()); - explicit basic_string(basic_string_view sv, - const Allocator& a = Allocator()); - basic_string(const charT* s, - size_type n, const Allocator& a = Allocator()); + basic_string(const T& t, size_type pos, size_type n, const Allocator& a = Allocator()); + explicit basic_string(basic_string_view sv, const Allocator& a = Allocator()); + basic_string(const charT* s, size_type n, const Allocator& a = Allocator()); basic_string(const charT* s, const Allocator& a = Allocator()); basic_string(size_type n, charT c, const Allocator& a = Allocator()); template - basic_string(InputIterator begin, InputIterator end, - const Allocator& a = Allocator()); + basic_string(InputIterator begin, InputIterator end, const Allocator& a = Allocator()); basic_string(initializer_list, const Allocator& = Allocator()); basic_string(const basic_string&, const Allocator&); basic_string(basic_string&&, const Allocator&); @@ -972,8 +971,7 @@ basic_string& operator+=(charT c); basic_string& operator+=(initializer_list); basic_string& append(const basic_string& str); - basic_string& append(const basic_string& str, size_type pos, - size_type n = npos); + basic_string& append(const basic_string& str, size_type pos, size_type n = npos); basic_string& append(basic_string_view sv); template basic_string& append(const T& t, size_type pos, size_type n = npos); @@ -983,14 +981,14 @@ template basic_string& append(InputIterator first, InputIterator last); basic_string& append(initializer_list); + void push_back(charT c); basic_string& assign(const basic_string& str); basic_string& assign(basic_string&& str) noexcept(allocator_traits::propagate_on_container_move_assignment::value || allocator_traits::is_always_equal::value); - basic_string& assign(const basic_string& str, size_type pos, - size_type n = npos); + basic_string& assign(const basic_string& str, size_type pos, size_type n = npos); basic_string& assign(basic_string_view sv); template basic_string& assign(const T& t, size_type pos, size_type n = npos); @@ -1006,8 +1004,7 @@ size_type pos2, size_type n = npos); basic_string& insert(size_type pos, basic_string_view sv); template - basic_string& insert(size_type pos1, const T& t, - size_type pos2, size_type n = npos); + basic_string& insert(size_type pos1, const T& t, size_type pos2, size_type n = npos); basic_string& insert(size_type pos, const charT* s, size_type n); basic_string& insert(size_type pos, const charT* s); basic_string& insert(size_type pos, size_type n, charT c); @@ -1023,37 +1020,30 @@ void pop_back(); - basic_string& replace(size_type pos1, size_type n1, - const basic_string& str); - basic_string& replace(size_type pos1, size_type n1, - const basic_string& str, + basic_string& replace(size_type pos1, size_type n1, const basic_string& str); + basic_string& replace(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos); - basic_string& replace(size_type pos1, size_type n1, - basic_string_view sv); + basic_string& replace(size_type pos1, size_type n1, basic_string_view sv); template basic_string& replace(size_type pos1, size_type n1, const T& t, size_type pos2, size_type n2 = npos); - basic_string& replace(size_type pos, size_type n1, const charT* s, - size_type n2); + basic_string& replace(size_type pos, size_type n1, const charT* s, size_type n2); basic_string& replace(size_type pos, size_type n1, const charT* s); - basic_string& replace(size_type pos, size_type n1, size_type n2, - charT c); + basic_string& replace(size_type pos, size_type n1, size_type n2, charT c); - basic_string& replace(const_iterator i1, const_iterator i2, - const basic_string& str); + basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str); basic_string& replace(const_iterator i1, const_iterator i2, basic_string_view sv); - basic_string& replace(const_iterator i1, const_iterator i2, const charT* s, - size_type n); + basic_string& replace(const_iterator i1, const_iterator i2, const charT* s, size_type n); basic_string& replace(const_iterator i1, const_iterator i2, const charT* s); - basic_string& replace(const_iterator i1, const_iterator i2, - size_type n, charT c); + basic_string& replace(const_iterator i1, const_iterator i2, size_type n, charT c); template basic_string& replace(const_iterator i1, const_iterator i2, InputIterator j1, InputIterator j2); basic_string& replace(const_iterator, const_iterator, initializer_list); size_type copy(charT* s, size_type n, size_type pos = 0) const; + void swap(basic_string& str) noexcept(allocator_traits::propagate_on_container_swap::value || allocator_traits::is_always_equal::value); @@ -1065,14 +1055,12 @@ operator basic_string_view() const noexcept; allocator_type get_allocator() const noexcept; - size_type find (basic_string_view sv, - size_type pos = 0) const noexcept; + size_type find (basic_string_view sv, size_type pos = 0) const noexcept; size_type find (const basic_string& str, size_type pos = 0) const noexcept; size_type find (const charT* s, size_type pos, size_type n) const; size_type find (const charT* s, size_type pos = 0) const; size_type find (charT c, size_type pos = 0) const; - size_type rfind(basic_string_view sv, - size_type pos = npos) const noexcept; + size_type rfind(basic_string_view sv, size_type pos = npos) const noexcept; size_type rfind(const basic_string& str, size_type pos = npos) const noexcept; size_type rfind(const charT* s, size_type pos, size_type n) const; size_type rfind(const charT* s, size_type pos = npos) const; @@ -1080,57 +1068,43 @@ size_type find_first_of(basic_string_view sv, size_type pos = 0) const noexcept; - size_type find_first_of(const basic_string& str, - size_type pos = 0) const noexcept; - size_type find_first_of(const charT* s, - size_type pos, size_type n) const; + size_type find_first_of(const basic_string& str, size_type pos = 0) const noexcept; + size_type find_first_of(const charT* s, size_type pos, size_type n) const; size_type find_first_of(const charT* s, size_type pos = 0) const; size_type find_first_of(charT c, size_type pos = 0) const; size_type find_last_of (basic_string_view sv, size_type pos = npos) const noexcept; - size_type find_last_of (const basic_string& str, - size_type pos = npos) const noexcept; - size_type find_last_of (const charT* s, - size_type pos, size_type n) const; + size_type find_last_of (const basic_string& str, size_type pos = npos) const noexcept; + size_type find_last_of (const charT* s, size_type pos, size_type n) const; size_type find_last_of (const charT* s, size_type pos = npos) const; size_type find_last_of (charT c, size_type pos = npos) const; size_type find_first_not_of(basic_string_view sv, size_type pos = 0) const noexcept; - size_type find_first_not_of(const basic_string& str, - size_type pos = 0) const noexcept; - size_type find_first_not_of(const charT* s, size_type pos, - size_type n) const; + size_type find_first_not_of(const basic_string& str, size_type pos = 0) const noexcept; + size_type find_first_not_of(const charT* s, size_type pos, size_type n) const; size_type find_first_not_of(const charT* s, size_type pos = 0) const; size_type find_first_not_of(charT c, size_type pos = 0) const; size_type find_last_not_of (basic_string_view sv, size_type pos = npos) const noexcept; - size_type find_last_not_of (const basic_string& str, - size_type pos = npos) const noexcept; - size_type find_last_not_of (const charT* s, size_type pos, - size_type n) const; - size_type find_last_not_of (const charT* s, - size_type pos = npos) const; + size_type find_last_not_of (const basic_string& str, size_type pos = npos) const noexcept; + size_type find_last_not_of (const charT* s, size_type pos, size_type n) const; + size_type find_last_not_of (const charT* s, size_type pos = npos) const; size_type find_last_not_of (charT c, size_type pos = npos) const; basic_string substr(size_type pos = 0, size_type n = npos) const; int compare(basic_string_view sv) const noexcept; - int compare(size_type pos1, size_type n1, - basic_string_view sv) const; + int compare(size_type pos1, size_type n1, basic_string_view sv) const; template int compare(size_type pos1, size_type n1, const T& t, size_type pos2, size_type n2 = npos) const; int compare(const basic_string& str) const noexcept; - int compare(size_type pos1, size_type n1, - const basic_string& str) const; - int compare(size_type pos1, size_type n1, - const basic_string& str, + int compare(size_type pos1, size_type n1, const basic_string& str) const; + int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos) const; int compare(const charT* s) const; - int compare(size_type pos1, size_type n1, - const charT* s) const; - int compare(size_type pos1, size_type n1, - const charT* s, size_type n2) const; + int compare(size_type pos1, size_type n1, const charT* s) const; + int compare(size_type pos1, size_type n1, const charT* s, size_type n2) const; }; template - basic_string(InputIterator begin, InputIterator end, - const Allocator& a = Allocator()); + basic_string(InputIterator begin, InputIterator end, const Allocator& a = Allocator()); \end{itemdecl} \begin{itemdescr} @@ -1914,8 +1887,7 @@ \indexlibrarymember{operator+=}{basic_string}% \begin{itemdecl} -basic_string& - operator+=(const basic_string& str); +basic_string& operator+=(const basic_string& str); \end{itemdecl} \begin{itemdescr} @@ -1988,8 +1960,7 @@ \indexlibrarymember{append}{basic_string}% \begin{itemdecl} -basic_string& - append(const basic_string& str); +basic_string& append(const basic_string& str); \end{itemdecl} \begin{itemdescr} @@ -2003,8 +1974,7 @@ \indexlibrarymember{append}{basic_string}% \begin{itemdecl} -basic_string& - append(const basic_string& str, size_type pos, size_type n = npos); +basic_string& append(const basic_string& str, size_type pos, size_type n = npos); \end{itemdecl} \begin{itemdescr} @@ -2069,8 +2039,7 @@ \indexlibrarymember{append}{basic_string}% \begin{itemdecl} -basic_string& - append(const charT* s, size_type n); +basic_string& append(const charT* s, size_type n); \end{itemdecl} \begin{itemdescr} @@ -2204,9 +2173,7 @@ \indexlibrarymember{assign}{basic_string}% \begin{itemdecl} -basic_string& - assign(const basic_string& str, size_type pos, - size_type n = npos); +basic_string& assign(const basic_string& str, size_type pos, size_type n = npos); \end{itemdecl} \begin{itemdescr} @@ -2319,6 +2286,7 @@ \effects Calls \tcode{assign(il.begin(), il.size())}. \pnum +\returns \tcode{*this}. \end{itemdescr} @@ -2356,9 +2324,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -basic_string& - insert(size_type pos, - const basic_string& str); +basic_string& insert(size_type pos, const basic_string& str); \end{itemdecl} \begin{itemdescr} @@ -2368,10 +2334,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -basic_string& - insert(size_type pos1, - const basic_string& str, - size_type pos2, size_type n = npos); +basic_string& insert(size_type pos1, const basic_string& str, size_type pos2, size_type n = npos); \end{itemdecl} \begin{itemdescr} @@ -2408,8 +2371,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} template - basic_string& insert(size_type pos1, const T& t, - size_type pos2, size_type n = npos); + basic_string& insert(size_type pos1, const T& t, size_type pos2, size_type n = npos); \end{itemdecl} \begin{itemdescr} @@ -2441,8 +2403,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -basic_string& - insert(size_type pos, const charT* s, size_type n); +basic_string& insert(size_type pos, const charT* s, size_type n); \end{itemdecl} \begin{itemdescr} @@ -2469,8 +2430,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -basic_string& - insert(size_type pos, const charT* s); +basic_string& insert(size_type pos, const charT* s); \end{itemdecl} \begin{itemdescr} @@ -2484,8 +2444,7 @@ \indexlibrarymember{insert}{basic_string}% \begin{itemdecl} -basic_string& - insert(size_type pos, size_type n, charT c); +basic_string& insert(size_type pos, size_type n, charT c); \end{itemdecl} \begin{itemdescr} @@ -2686,9 +2645,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& - replace(size_type pos1, size_type n1, - const basic_string& str); +basic_string& replace(size_type pos1, size_type n1, const basic_string& str); \end{itemdecl} \begin{itemdescr} @@ -2698,10 +2655,8 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& - replace(size_type pos1, size_type n1, - const basic_string& str, - size_type pos2, size_type n2 = npos); +basic_string& replace(size_type pos1, size_type n1, const basic_string& str, + size_type pos2, size_type n2 = npos); \end{itemdecl} \begin{itemdescr} @@ -2772,8 +2727,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& - replace(size_type pos1, size_type n1, const charT* s, size_type n2); +basic_string& replace(size_type pos1, size_type n1, const charT* s, size_type n2); \end{itemdecl} \begin{itemdescr} @@ -2804,8 +2758,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& - replace(size_type pos, size_type n, const charT* s); +basic_string& replace(size_type pos, size_type n, const charT* s); \end{itemdecl} \begin{itemdescr} @@ -2819,9 +2772,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& - replace(size_type pos1, size_type n1, - size_type n2, charT c); +basic_string& replace(size_type pos1, size_type n1, size_type n2, charT c); \end{itemdecl} \begin{itemdescr} @@ -2854,8 +2805,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& replace(const_iterator i1, const_iterator i2, - basic_string_view sv); +basic_string& replace(const_iterator i1, const_iterator i2, basic_string_view sv); \end{itemdecl} \begin{itemdescr} @@ -2874,8 +2824,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& - replace(const_iterator i1, const_iterator i2, const charT* s, size_type n); +basic_string& replace(const_iterator i1, const_iterator i2, const charT* s, size_type n); \end{itemdecl} \begin{itemdescr} @@ -2912,8 +2861,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& replace(const_iterator i1, const_iterator i2, size_type n, - charT c); +basic_string& replace(const_iterator i1, const_iterator i2, size_type n, charT c); \end{itemdecl} \begin{itemdescr} @@ -2931,8 +2879,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} template - basic_string& replace(const_iterator i1, const_iterator i2, - InputIterator j1, InputIterator j2); + basic_string& replace(const_iterator i1, const_iterator i2, InputIterator j1, InputIterator j2); \end{itemdecl} \begin{itemdescr} @@ -2949,8 +2896,7 @@ \indexlibrarymember{replace}{basic_string}% \begin{itemdecl} -basic_string& replace(const_iterator i1, const_iterator i2, - initializer_list il); +basic_string& replace(const_iterator i1, const_iterator i2, initializer_list il); \end{itemdecl} \begin{itemdescr} @@ -3404,8 +3350,7 @@ \indexlibrarymember{find_first_not_of}{basic_string}% \begin{itemdecl} -size_type find_first_not_of(basic_string_view sv, - size_type pos = 0) const noexcept; +size_type find_first_not_of(basic_string_view sv, size_type pos = 0) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -3639,8 +3584,7 @@ \indexlibrarymember{compare}{basic_string}% \begin{itemdecl} template - int compare(size_type pos1, size_type n1, const T& t, - size_type pos2, size_type n2 = npos) const; + int compare(size_type pos1, size_type n1, const T& t, size_type pos2, size_type n2 = npos) const; \end{itemdecl} \begin{itemdescr} @@ -3686,8 +3630,7 @@ \indexlibrarymember{compare}{basic_string}% \begin{itemdecl} -int compare(size_type pos1, size_type n1, - const basic_string& str, +int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos) const; \end{itemdecl} @@ -3799,8 +3742,7 @@ \begin{itemdecl} template basic_string - operator+(const charT* lhs, - const basic_string& rhs); + operator+(const charT* lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -3818,8 +3760,7 @@ \begin{itemdecl} template basic_string - operator+(const charT* lhs, - basic_string&& rhs); + operator+(const charT* lhs, basic_string&& rhs); \end{itemdecl} \begin{itemdescr} @@ -3837,8 +3778,7 @@ \begin{itemdecl} template basic_string - operator+(charT lhs, - const basic_string& rhs); + operator+(charT lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -3851,8 +3791,7 @@ \begin{itemdecl} template basic_string - operator+(charT lhs, - basic_string&& rhs); + operator+(charT lhs, basic_string&& rhs); \end{itemdecl} \begin{itemdescr} @@ -3865,8 +3804,7 @@ \begin{itemdecl} template basic_string - operator+(const basic_string& lhs, - const charT* rhs); + operator+(const basic_string& lhs, const charT* rhs); \end{itemdecl} \begin{itemdescr} @@ -3884,8 +3822,7 @@ \begin{itemdecl} template basic_string - operator+(basic_string&& lhs, - const charT* rhs); + operator+(basic_string&& lhs, const charT* rhs); \end{itemdecl} \begin{itemdescr} @@ -3903,8 +3840,7 @@ \begin{itemdecl} template basic_string - operator+(const basic_string& lhs, - charT rhs); + operator+(const basic_string& lhs, charT rhs); \end{itemdecl} \begin{itemdescr} @@ -3917,8 +3853,7 @@ \begin{itemdecl} template basic_string - operator+(basic_string&& lhs, - charT rhs); + operator+(basic_string&& lhs, charT rhs); \end{itemdecl} \begin{itemdescr} @@ -3945,8 +3880,7 @@ \indexlibrarymember{operator==}{basic_string}% \begin{itemdecl} template - bool operator==(const charT* lhs, - const basic_string& rhs); + bool operator==(const charT* lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -3958,8 +3892,7 @@ \indexlibrarymember{operator==}{basic_string}% \begin{itemdecl} template - bool operator==(const basic_string& lhs, - const charT* rhs); + bool operator==(const basic_string& lhs, const charT* rhs); \end{itemdecl} \begin{itemdescr} @@ -3990,8 +3923,7 @@ \indexlibrarymember{operator"!=}{basic_string}% \begin{itemdecl} template - bool operator!=(const charT* lhs, - const basic_string& rhs); + bool operator!=(const charT* lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -4003,8 +3935,7 @@ \indexlibrarymember{operator"!=}{basic_string}% \begin{itemdecl} template - bool operator!=(const basic_string& lhs, - const charT* rhs); + bool operator!=(const basic_string& lhs, const charT* rhs); \end{itemdecl} \begin{itemdescr} @@ -4022,8 +3953,8 @@ \indexlibrarymember{operator<}{basic_string}% \begin{itemdecl} template - bool operator< (const basic_string& lhs, - const basic_string& rhs) noexcept; + bool operator<(const basic_string& lhs, + const basic_string& rhs) noexcept; \end{itemdecl} \begin{itemdescr} @@ -4035,8 +3966,7 @@ \indexlibrarymember{operator<}{basic_string}% \begin{itemdecl} template - bool operator< (const charT* lhs, - const basic_string& rhs); + bool operator<(const charT* lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -4048,8 +3978,7 @@ \indexlibrarymember{operator<}{basic_string}% \begin{itemdecl} template - bool operator< (const basic_string& lhs, - const charT* rhs); + bool operator<(const basic_string& lhs, const charT* rhs); \end{itemdecl} \begin{itemdescr} @@ -4063,8 +3992,8 @@ \indexlibrarymember{operator>}{basic_string}% \begin{itemdecl} template - bool operator> (const basic_string& lhs, - const basic_string& rhs) noexcept; + bool operator>(const basic_string& lhs, + const basic_string& rhs) noexcept; \end{itemdecl} \begin{itemdescr} @@ -4076,8 +4005,7 @@ \indexlibrarymember{operator>}{basic_string}% \begin{itemdecl} template - bool operator> (const charT* lhs, - const basic_string& rhs); + bool operator>(const charT* lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -4089,8 +4017,7 @@ \indexlibrarymember{operator>}{basic_string}% \begin{itemdecl} template - bool operator> (const basic_string& lhs, - const charT* rhs); + bool operator>(const basic_string& lhs, const charT* rhs); \end{itemdecl} \begin{itemdescr} @@ -4117,8 +4044,7 @@ \indexlibrarymember{operator<=}{basic_string}% \begin{itemdecl} template - bool operator<=(const charT* lhs, - const basic_string& rhs); + bool operator<=(const charT* lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -4130,8 +4056,7 @@ \indexlibrarymember{operator<=}{basic_string}% \begin{itemdecl} template - bool operator<=(const basic_string& lhs, - const charT* rhs); + bool operator<=(const basic_string& lhs, const charT* rhs); \end{itemdecl} \begin{itemdescr} @@ -4158,8 +4083,7 @@ \indexlibrarymember{operator>=}{basic_string}% \begin{itemdecl} template - bool operator>=(const charT* lhs, - const basic_string& rhs); + bool operator>=(const charT* lhs, const basic_string& rhs); \end{itemdecl} \begin{itemdescr} @@ -4171,8 +4095,7 @@ \indexlibrarymember{operator>=}{basic_string}% \begin{itemdecl} template - bool operator>=(const basic_string& lhs, - const charT* rhs); + bool operator>=(const basic_string& lhs, const charT* rhs); \end{itemdecl} \begin{itemdescr} @@ -4203,8 +4126,7 @@ \begin{itemdecl} template basic_istream& - operator>>(basic_istream& is, - basic_string& str); + operator>>(basic_istream& is, basic_string& str); \end{itemdecl} \begin{itemdescr} @@ -4760,14 +4682,15 @@ size_type copy(charT* s, size_type n, size_type pos = 0) const; constexpr basic_string_view substr(size_type pos = 0, size_type n = npos) const; + constexpr int compare(basic_string_view s) const noexcept; constexpr int compare(size_type pos1, size_type n1, basic_string_view s) const; constexpr int compare(size_type pos1, size_type n1, basic_string_view s, size_type pos2, size_type n2) const; constexpr int compare(const charT* s) const; constexpr int compare(size_type pos1, size_type n1, const charT* s) const; - constexpr int compare(size_type pos1, size_type n1, const charT* s, - size_type n2) const; + constexpr int compare(size_type pos1, size_type n1, const charT* s, size_type n2) const; + constexpr size_type find(basic_string_view s, size_type pos = 0) const noexcept; constexpr size_type find(charT c, size_type pos = 0) const noexcept; constexpr size_type find(const charT* s, size_type pos, size_type n) const; @@ -4776,6 +4699,7 @@ constexpr size_type rfind(charT c, size_type pos = npos) const noexcept; constexpr size_type rfind(const charT* s, size_type pos, size_type n) const; constexpr size_type rfind(const charT* s, size_type pos = npos) const; + constexpr size_type find_first_of(basic_string_view s, size_type pos = 0) const noexcept; constexpr size_type find_first_of(charT c, size_type pos = 0) const noexcept; constexpr size_type find_first_of(const charT* s, size_type pos, size_type n) const; @@ -5260,8 +5184,7 @@ \indexlibrarymember{compare}{basic_string_view}% \begin{itemdecl} -constexpr int compare(size_type pos1, size_type n1, - const charT* s, size_type n2) const; +constexpr int compare(size_type pos1, size_type n1, const charT* s, size_type n2) const; \end{itemdecl} \begin{itemdescr} @@ -5533,8 +5456,8 @@ \indexlibrarymember{operator<}{basic_string_view}% \begin{itemdecl} template - constexpr bool operator< (basic_string_view lhs, - basic_string_view rhs) noexcept; + constexpr bool operator<(basic_string_view lhs, + basic_string_view rhs) noexcept; \end{itemdecl} \begin{itemdescr} @@ -5546,8 +5469,8 @@ \indexlibrarymember{operator>}{basic_string_view}% \begin{itemdecl} template - constexpr bool operator> (basic_string_view lhs, - basic_string_view rhs) noexcept; + constexpr bool operator>(basic_string_view lhs, + basic_string_view rhs) noexcept; \end{itemdecl} \begin{itemdescr} @@ -5588,8 +5511,7 @@ \begin{itemdecl} template basic_ostream& - operator<<(basic_ostream& os, - basic_string_view str); + operator<<(basic_ostream& os, basic_string_view str); \end{itemdecl} \begin{itemdescr} @@ -5868,7 +5790,7 @@ \begin{note} The functions \tcode{strchr}, \tcode{strpbrk}, \tcode{strrchr}, \tcode{strstr}, and \tcode{memchr}, -have different signatures in this International Standard, +have different signatures in this document, but they have the same behavior as in the C standard library\iref{library.c}. \end{note} @@ -6038,7 +5960,7 @@ \begin{note} The functions \tcode{wcschr}, \tcode{wcspbrk}, \tcode{wcsrchr}, \tcode{wcsstr}, and \tcode{wmemchr} -have different signatures in this International Standard, +have different signatures in this document, but they have the same behavior as in the C standard library\iref{library.c}. \end{note} diff --git a/source/styles.tex b/source/styles.tex index 6ad893ab35..9614ac53c0 100644 --- a/source/styles.tex +++ b/source/styles.tex @@ -103,7 +103,8 @@ \setlength{\partopsep}{0pt} \newlist{indenthelper}{itemize}{1} \newlist{bnflist}{itemize}{1} -\setlist[itemize]{parsep=\parskip, partopsep=0pt, itemsep=0pt, topsep=0pt} +\setlist[itemize]{parsep=\parskip, partopsep=0pt, itemsep=0pt, topsep=0pt, + beginpenalty=10 } \setlist[enumerate]{parsep=\parskip, partopsep=0pt, itemsep=0pt, topsep=0pt} \setlist[indenthelper]{parsep=\parskip, partopsep=0pt, itemsep=0pt, topsep=0pt, label={}} \setlist[bnflist]{parsep=\parskip, partopsep=0pt, itemsep=0pt, topsep=0pt, label={}, @@ -149,3 +150,205 @@ %% set section numbering limit, toc limit \maxsecnumdepth{subparagraph} \setcounter{tocdepth}{1} + +%%-------------------------------------------------- +%% override some functions from the listings package to avoid bad page breaks +%% (copied verbatim from listings.sty version 1.6 except where commented) +\makeatletter + +\lst@CheckVersion{1.6}{\lst@CheckVersion{1.5b}{ + \typeout{^^J% + ***^^J% + *** This file requires listings.sty version 1.6.^^J% + *** You have version \lst@version; exiting ...^^J% + ***^^J}% + \batchmode \@@end}} + +\def\lst@Init#1{% + \begingroup + \ifx\lst@float\relax\else + \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]}% + \expandafter\@tempa + \fi + \ifx\lst@multicols\@empty\else + \edef\lst@next{\noexpand\multicols{\lst@multicols}} + \expandafter\lst@next + \fi + \ifhmode\ifinner \lst@boxtrue \fi\fi + \lst@ifbox + \lsthk@BoxUnsafe + \hbox to\z@\bgroup + $\if t\lst@boxpos \vtop + \else \if b\lst@boxpos \vbox + \else \vcenter \fi\fi + \bgroup \par\noindent + \else + \lst@ifdisplaystyle + \lst@EveryDisplay + % make penalty configurable + \par\lst@beginpenalty + \vspace\lst@aboveskip + \fi + \fi + \normalbaselines + \abovecaptionskip\lst@abovecaption\relax + \belowcaptionskip\lst@belowcaption\relax + \lst@MakeCaption t% + \lsthk@PreInit \lsthk@Init + \lst@ifdisplaystyle + \global\let\lst@ltxlabel\@empty + \if@inlabel + \lst@ifresetmargins + \leavevmode + \else + \xdef\lst@ltxlabel{\the\everypar}% + \lst@AddTo\lst@ltxlabel{% + \global\let\lst@ltxlabel\@empty + \everypar{\lsthk@EveryLine\lsthk@EveryPar}}% + \fi + \fi + % A section heading might have set \everypar to apply a \clubpenalty + % to the following paragraph, changing \everypar in the process. + % Unconditionally overriding \everypar is a bad idea. + % \everypar\expandafter{\lst@ltxlabel + % \lsthk@EveryLine\lsthk@EveryPar}% + \else + \everypar{}\let\lst@NewLine\@empty + \fi + \lsthk@InitVars \lsthk@InitVarsBOL + \lst@Let{13}\lst@MProcessListing + \let\lst@Backslash#1% + \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}% + \lst@InitFinalize} + +\def\lst@DeInit{% + \lst@XPrintToken \lst@EOLUpdate + \global\advance\lst@newlines\m@ne + \lst@ifshowlines + \lst@DoNewLines + \else + \setbox\@tempboxa\vbox{\lst@DoNewLines}% + \fi + \lst@ifdisplaystyle \par\removelastskip \fi + \lsthk@ExitVars\everypar{}\lsthk@DeInit\normalbaselines\normalcolor + \lst@MakeCaption b% + \lst@ifbox + \egroup $\hss \egroup + \vrule\@width\lst@maxwidth\@height\z@\@depth\z@ + \else + \lst@ifdisplaystyle + % make penalty configurable + \par\lst@endpenalty + \vspace\lst@belowskip + \fi + \fi + \ifx\lst@multicols\@empty\else + \def\lst@next{\global\let\@checkend\@gobble + \endmulticols + \global\let\@checkend\lst@@checkend} + \expandafter\lst@next + \fi + \ifx\lst@float\relax\else + \expandafter\lst@endfloat + \fi + \endgroup} + + +\def\lst@NewLine{% + \ifx\lst@OutputBox\@gobble\else + \par + % add configurable penalties + \lst@ifeolsemicolon + \lst@semicolonpenalty + \lst@eolsemicolonfalse + \else + \lst@domidpenalty + \fi + % Manually apply EveryLine and EveryPar; do not depend on \everypar + \noindent \hbox{}\lsthk@EveryLine% + % \lsthk@EveryPar uses \refstepcounter which balloons the PDF + \fi + \global\advance\lst@newlines\m@ne + \lst@newlinetrue} + +% new macro for empty lines, avoiding an \hbox that cannot be discarded +\def\lst@DoEmptyLine{% + \ifvmode\else\par\fi\lst@emptylinepenalty + \vskip\parskip + \vskip\baselineskip + % \lsthk@EveryLine has \lst@parshape, i.e. \parshape, which causes an \hbox + % \lsthk@EveryPar increments line counters; \refstepcounter balloons the PDF + \global\advance\lst@newlines\m@ne + \lst@newlinetrue} + +\def\lst@DoNewLines{ + \@whilenum\lst@newlines>\lst@maxempty \do + {\lst@ifpreservenumber + \lsthk@OnEmptyLine + \global\advance\c@lstnumber\lst@advancelstnum + \fi + \global\advance\lst@newlines\m@ne}% + \@whilenum \lst@newlines>\@ne \do + % special-case empty printing of lines + {\lsthk@OnEmptyLine\lst@DoEmptyLine}% + \ifnum\lst@newlines>\z@ \lst@NewLine \fi} + +% add keys for configuring before/end vertical penalties +\lst@Key{beginpenalty}\relax{\def\lst@beginpenalty{\penalty #1}} +\let\lst@beginpenalty\@empty +\lst@Key{midpenalty}\relax{\def\lst@midpenalty{\penalty #1}} +\let\lst@midpenalty\@empty +\lst@Key{endpenalty}\relax{\def\lst@endpenalty{\penalty #1}} +\let\lst@endpenalty\@empty +\lst@Key{emptylinepenalty}\relax{\def\lst@emptylinepenalty{\penalty #1}} +\let\lst@emptylinepenalty\@empty +\lst@Key{semicolonpenalty}\relax{\def\lst@semicolonpenalty{\penalty #1}} +\let\lst@semicolonpenalty\@empty + +\lst@AddToHook{InitVars}{\let\lst@domidpenalty\@empty} +\lst@AddToHook{InitVarsEOL}{\let\lst@domidpenalty\lst@midpenalty} + +% handle semicolons and closing braces (could be in \lstdefinelanguage as well) +\def\lst@eolsemicolontrue{\global\let\lst@ifeolsemicolon\iftrue} +\def\lst@eolsemicolonfalse{\global\let\lst@ifeolsemicolon\iffalse} +\lst@AddToHook{InitVars}{ + \global\let\lst@eolsemicolonpending\@empty + \lst@eolsemicolonfalse +} +% If we found a semicolon or closing brace while parsing the current line, +% inform the subsequent \lst@NewLine about it for penalties. +\lst@AddToHook{InitVarsEOL}{% + \ifx\lst@eolsemicolonpending\relax + \lst@eolsemicolontrue + \global\let\lst@eolsemicolonpending\@empty + \fi% +} +\lst@AddToHook{SelectCharTable}{% + % In theory, we should only detect trailing semicolons or braces, + % but that would require un-doing the marking for any other character. + % The next best thing is to undo the marking for closing parentheses, + % because loops or if statements are the only places where we will + % reasonably have a semicolon in the middle of a line, and those all + % end with a closing parenthesis. + \lst@DefSaveDef{41}\lstsaved@closeparen{% handle closing parenthesis + \lstsaved@closeparen + \ifnum\lst@mode=\lst@Pmode % regular processing mode (not a comment) + \global\let\lst@eolsemicolonpending\@empty % undo semicolon setting + \fi% + }% + \lst@DefSaveDef{59}\lstsaved@semicolon{% handle semicolon + \lstsaved@semicolon + \ifnum\lst@mode=\lst@Pmode % regular processing mode (not a comment) + \global\let\lst@eolsemicolonpending\relax + \fi% + }% + \lst@DefSaveDef{125}\lstsaved@closebrace{% handle closing brace + \lst@eolsemicolonfalse % do not break before a closing brace + \lstsaved@closebrace % might invoke \lst@NewLine + \ifnum\lst@mode=\lst@Pmode % regular processing mode (not a comment) + \global\let\lst@eolsemicolonpending\relax + \fi% + }% +} + +\makeatother diff --git a/source/support.tex b/source/support.tex index b167bce009..e2a85f5d77 100644 --- a/source/support.tex +++ b/source/support.tex @@ -252,7 +252,7 @@ \ref{c.math.rand}, and \ref{c.math.abs}. \begin{note} -Several functions have additional overloads in this International Standard, +Several functions have additional overloads in this document, but they have the same behavior as in the C standard library\iref{library.c}. \end{note} @@ -294,7 +294,7 @@ has the same semantics as the corresponding macro in the C standard library header \tcode{}, but accepts a restricted set of \tcode{\placeholder{type}} -arguments in this International Standard. +arguments in this document. Use of the \tcode{offsetof} macro with a \tcode{\placeholder{type}} other than a standard-layout class\iref{class} is conditionally-supported.\footnote{Note that \tcode{offsetof} @@ -1182,7 +1182,7 @@ \pnum \begin{example} \tcode{is_modulo} is \tcode{false} for signed integer types\iref{basic.fundamental} -unless an implementation, as an extension to this International Standard, +unless an implementation, as an extension to this document, defines signed integer overflow to wrap. \end{example} @@ -1789,9 +1789,6 @@ of objects with thread storage duration. \end{note} After calling registered functions, \tcode{quick_exit} shall call \tcode{_Exit(status)}. -\begin{note} -The standard file buffers are not flushed. -\end{note} \pnum \remarks @@ -1821,9 +1818,12 @@ namespace std { class bad_alloc; class bad_array_new_length; + enum class align_val_t : size_t {}; + struct nothrow_t { explicit nothrow_t() = default; }; extern const nothrow_t nothrow; + using new_handler = void (*)(); new_handler get_new_handler() noexcept; new_handler set_new_handler(new_handler new_p) noexcept; @@ -1839,27 +1839,27 @@ void* operator new(std::size_t size); void* operator new(std::size_t size, std::align_val_t alignment); void* operator new(std::size_t size, const std::nothrow_t&) noexcept; -void* operator new(std::size_t size, std::align_val_t alignment, - const std::nothrow_t&) noexcept; +void* operator new(std::size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept; + void operator delete(void* ptr) noexcept; void operator delete(void* ptr, std::size_t size) noexcept; void operator delete(void* ptr, std::align_val_t alignment) noexcept; void operator delete(void* ptr, std::size_t size, std::align_val_t alignment) noexcept; void operator delete(void* ptr, const std::nothrow_t&) noexcept; -void operator delete(void* ptr, std::align_val_t alignment, - const std::nothrow_t&) noexcept; +void operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; + void* operator new[](std::size_t size); void* operator new[](std::size_t size, std::align_val_t alignment); void* operator new[](std::size_t size, const std::nothrow_t&) noexcept; void* operator new[](std::size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept; + void operator delete[](void* ptr) noexcept; void operator delete[](void* ptr, std::size_t size) noexcept; void operator delete[](void* ptr, std::align_val_t alignment) noexcept; void operator delete[](void* ptr, std::size_t size, std::align_val_t alignment) noexcept; void operator delete[](void* ptr, const std::nothrow_t&) noexcept; -void operator delete[](void* ptr, std::align_val_t alignment, - const std::nothrow_t&) noexcept; +void operator delete[](void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; void* operator new (std::size_t size, void* ptr) noexcept; void* operator new[](std::size_t size, void* ptr) noexcept; @@ -3711,11 +3711,8 @@ \indexlibrary{\idxhdr{csignal}}% \indextext{\idxhdr{cstdlib}}% \indexlibrary{\idxhdr{cstdlib}}% -\indextext{\idxhdr{cstdbool}}% -\indexlibrary{\idxhdr{cstdbool}}% \indexlibrary{\idxcode{getenv}}% \indexlibrary{\idxcode{system}}% -\indexlibrary{\idxcode{__bool_true_false_are_defined}}% Headers \tcode{} (nonlocal jumps), \tcode{} (signal handling), @@ -3775,7 +3772,7 @@ macro in header \indexlibrary{\idxhdr{stdarg.h}}% \tcode{} -are different in this International Standard. +are different in this document. The parameter \tcode{parmN} is the rightmost parameter in the variable parameter list @@ -3823,7 +3820,7 @@ The function signature \indexlibrary{\idxcode{longjmp}}% \tcode{longjmp(jmp_buf jbuf, int val)} -has more restricted behavior in this International Standard. +has more restricted behavior in this document. A \tcode{setjmp}/\tcode{longjmp} call pair has undefined behavior if replacing the \tcode{setjmp} and \tcode{longjmp} by \tcode{catch} and \tcode{throw} would invoke any non-trivial destructors for any automatic diff --git a/source/templates.tex b/source/templates.tex index 7de89d2069..04245bb9fb 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -104,18 +104,18 @@ template constexpr T pi = T(3.1415926535897932385L); template -T circular_area(T r) { - return pi * r * r; -} + T circular_area(T r) { + return pi * r * r; + } struct matrix_constants { template - using pauli = hermitian_matrix; + using pauli = hermitian_matrix; template - constexpr pauli sigma1 = { { 0, 1 }, { 1, 0 } }; + constexpr pauli sigma1 = { { 0, 1 }, { 1, 0 } }; template - constexpr pauli sigma2 = { { 0, -1i }, { 1i, 0 } }; + constexpr pauli sigma2 = { { 0, -1i }, { 1i, 0 } }; template - constexpr pauli sigma3 = { { 1, 0 }, { 0, -1 } }; + constexpr pauli sigma3 = { { 1, 0 }, { 0, -1 } }; }; \end{codeblock} \end{example} @@ -215,7 +215,7 @@ \begin{example} \begin{codeblock} template requires N == sizeof new unsigned short -int f(); // error: parentheses required around \tcode{==} expression +int f(); // error: parentheses required around \tcode{==} expression \end{codeblock} \end{example} \end{note} @@ -723,10 +723,10 @@ inline void g(); }; template