From 0bb597662a508554f3199336250abacd66084cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 24 Sep 2020 23:30:57 +0100 Subject: [PATCH 1/8] [intro] Add a page break. This prevents a footnote from spanning two pages and also makes all subclause headings appear at the top of a page. --- source/intro.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/intro.tex b/source/intro.tex index 6710ad90c0..03cebbf4f2 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -794,6 +794,8 @@ \indextext{conformance requirements!general|)}% \indextext{conformance requirements|)}% +\newpage + \rSec2[intro.abstract]{Abstract machine} \pnum From 7bd417499a3ea010816bce26ab7ec5dcdffc3c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 30 Sep 2020 22:36:31 +0100 Subject: [PATCH 2/8] [lex] Add a page break. --- source/lex.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/lex.tex b/source/lex.tex index 694326966b..3fba7f2bcd 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -918,6 +918,8 @@ \indextext{punctuator|)}% \indextext{operator|)} +\newpage + \rSec1[lex.literal]{Literals}% \indextext{literal|(} From e8b6be1d83709f46bd3b1d4a6cee065bd38a2c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Sat, 26 Sep 2020 20:58:54 +0100 Subject: [PATCH 3/8] [basic] Add page breaks. --- source/basic.tex | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/basic.tex b/source/basic.tex index e096189949..1d1748c9c7 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -235,6 +235,9 @@ copy assignment operator, move assignment operator\iref{class.copy.assign}, or destructor\iref{class.dtor} member functions. \end{note} + +\newpage + \begin{example} Given \begin{codeblock} @@ -4523,6 +4526,8 @@ \end{example} \end{note} +\newpage + The exceptions to this lifetime rule are: \begin{itemize} \item A temporary object bound to a reference parameter in a function call\iref{expr.call} @@ -5761,6 +5766,8 @@ \end{note} \indextext{program execution|)} +\newpage + \rSec2[intro.multithread]{Multi-threaded executions and data races} \rSec3[intro.multithread.general]{General} From 48a68c6ef78334c0499d2c41abec6bd4bb56841f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Sun, 27 Sep 2020 22:16:29 +0100 Subject: [PATCH 4/8] [diff] Add page breaks. --- source/compatibility.tex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/compatibility.tex b/source/compatibility.tex index 3ade25628f..82e1d097f1 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -88,6 +88,8 @@ or \tcode{requires} as an identifier is not valid in this revision of \Cpp{}. +\newpage + \diffref{lex.operators} \change New operator \tcode{<=>}. @@ -546,6 +548,8 @@ algorithms not explicitly specified to allow such in this version of \Cpp{} may fail to compile or have undefined behavior. +\newpage + \rSec2[diff.cpp17.input.output]{\ref{input.output}: input/output library} \diffref{istream.extractors} @@ -641,6 +645,8 @@ class templates \tcode{unary_negate} or \tcode{binary_negate}, may fail to compile. +\newpage + \nodiffref \change Remove redundant members from \tcode{std::allocator}. @@ -841,6 +847,8 @@ derived d2; // still OK \end{codeblock} +\newpage + \rSec2[diff.cpp14.class]{\ref{class}: classes} \diffref{class.inhctor.init} From afa9918532b0231d30d77be8c925b586799ab839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Sun, 27 Sep 2020 22:46:01 +0100 Subject: [PATCH 5/8] [depr] Add page breaks. --- source/future.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/future.tex b/source/future.tex index ba09cac4ab..927c92e032 100644 --- a/source/future.tex +++ b/source/future.tex @@ -85,6 +85,9 @@ \begin{note} Three-way comparisons\iref{expr.spaceship} between such operands are ill-formed. \end{note} + +\newpage + \begin{example} \begin{codeblock} int arr1[5]; @@ -173,6 +176,8 @@ \end{codeblock} \end{example} +\newpage + \rSec1[depr.local]{Non-local use of TU-local entities} \pnum @@ -305,6 +310,8 @@ \xrefc{7.15} +\newpage + \rSec2[depr.stdbool.h.syn]{Header \tcode{} synopsis} \indexheader{stdbool.h}% @@ -2132,6 +2139,8 @@ Attempting to write to a text file produces undefined behavior. \end{itemize} +\newpage + \pnum For the facet \tcode{codecvt_utf8_utf16}\indexlibraryglobal{codecvt_utf8_utf16}: \begin{itemize} From 79d33ee2c6470d389cda3c3147a5541ddd1dd1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Sun, 27 Sep 2020 23:04:14 +0100 Subject: [PATCH 6/8] [expr, stmt.stmt] Add page breaks for the grammar summary. This only affects Annex A. --- source/expressions.tex | 1 + source/statements.tex | 1 + 2 files changed, 2 insertions(+) diff --git a/source/expressions.tex b/source/expressions.tex index 0140bf3cfb..75955f8a49 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -1,6 +1,7 @@ %!TEX root = std.tex \rSec0[expr]{Expressions} +\begin{extract}\newpage\end{extract} \gramSec[gram.expr]{Expressions} \indextext{\idxcode{operator new}|seealso{\tcode{new}}}% diff --git a/source/statements.tex b/source/statements.tex index 5a7cda05d5..590dff62ef 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -2,6 +2,7 @@ \rSec0[stmt.stmt]{Statements}% \indextext{statement|(} +\begin{extract}\newpage\end{extract} \gramSec[gram.stmt]{Statements} \indextext{block (statement)|see{statement, compound}} From f29a90f1bd8d1776459f52dcbfb0a392f5742772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 29 Sep 2020 15:48:09 +0100 Subject: [PATCH 7/8] [ranges] Add page breaks. --- source/ranges.tex | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source/ranges.tex b/source/ranges.tex index 2375d887e1..c0e82140fa 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1276,6 +1276,8 @@ range && @\libconcept{same_as}@, sentinel_t>; \end{itemdecl} +\newpage + \pnum The \libconcept{viewable_range} concept specifies the requirements of a \libconcept{range} type that can be converted to a \libconcept{view} safely. @@ -2780,6 +2782,7 @@ if (@\exposid{stream_}@) { *@\exposid{stream_}@ >> @\exposid{object_}@; } + return @\exposid{iterator}@{*this}; } @@ -2884,6 +2887,8 @@ \expects \tcode{\exposid{parent_}->\exposid{stream_} != nullptr} is \tcode{true}. +\newpage + \pnum \effects Equivalent to: @@ -3439,6 +3444,8 @@ \end{codeblock} \end{itemdescr} +\newpage + \indexlibrarymember{operator\dcr}{filter_view::iterator}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator--() requires @\libconcept{bidirectional_range}@; @@ -3579,6 +3586,8 @@ \tcode{views::transform(E, F)} is expression-equivalent to \tcode{transform_view\{E, F\}}. +\newpage + \pnum \begin{example} \begin{codeblock} @@ -3850,6 +3859,8 @@ \item Otherwise, \tcode{iterator_concept} denotes \tcode{input_iterator_tag}. \end{itemize} +\newpage + \pnum \tcode{iterator::iterator_category} is defined as follows: Let \tcode{C} denote the type @@ -4009,6 +4020,8 @@ \end{codeblock} \end{itemdescr} +\newpage + \indexlibrarymember{operator-=}{transform_view::iterator}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator-=(difference_type n) @@ -4684,6 +4697,8 @@ Otherwise, \tcode{ranges::drop_view\{E, F\}}. \end{itemize} +\newpage + \pnum \begin{example} \begin{codeblock} @@ -4766,6 +4781,8 @@ \exposid{count_} with \tcode{count}. \end{itemdescr} +\newpage + \indexlibrarymember{begin}{drop_view}% \begin{itemdecl} constexpr auto begin() @@ -5239,6 +5256,8 @@ Equivalent to: \tcode{++*this}. \end{itemdescr} +\newpage + \indexlibrarymember{operator++}{join_view::iterator}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator++(int) @@ -6262,6 +6281,8 @@ \tcode{keys_view} is an alias for \tcode{elements_view, 0>}, and is useful for extracting keys from associative containers. +\newpage + \begin{example} \begin{codeblock} auto names = keys_view{historical_figures}; @@ -6548,6 +6569,8 @@ \end{codeblock} \end{itemdescr} +\newpage + \indexlibrarymember{operator+=}{elements_view::iterator}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator+=(difference_type n); @@ -6700,6 +6723,8 @@ Equivalent to: \tcode{return x.\exposid{current_} - y.\exposid{current_};} \end{itemdescr} +\newpage + \rSec3[range.elements.sentinel]{Class template \tcode{elements_view::\exposid{sentinel}}} \indexlibraryglobal{elements_view::sentinel}% From a53a98837f9829a98a9c5e7248a67f06acfd9a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 30 Sep 2020 18:08:58 +0100 Subject: [PATCH 8/8] [iterators] Add page breaks, and reflow some code lines. --- source/iterators.tex | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index 67ea9ce40d..3db988b74a 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -426,6 +426,7 @@ -> decltype(std::begin(c)); template constexpr auto cend(const C& c) noexcept(noexcept(std::end(c))) -> decltype(std::end(c)); + template constexpr auto rbegin(C& c) -> decltype(c.rbegin()); template constexpr auto rbegin(const C& c) -> decltype(c.rbegin()); template constexpr auto rend(C& c) -> decltype(c.rend()); @@ -442,9 +443,11 @@ template constexpr auto ssize(const C& c) -> common_type_t>; template constexpr ptrdiff_t ssize(const T (&array)[N]) noexcept; + template [[nodiscard]] constexpr auto empty(const C& c) -> decltype(c.empty()); template [[nodiscard]] constexpr bool empty(const T (&array)[N]) noexcept; template [[nodiscard]] constexpr bool empty(initializer_list il) noexcept; + template constexpr auto data(C& c) -> decltype(c.data()); template constexpr auto data(const C& c) -> decltype(c.data()); template constexpr T* data(T (&array)[N]) noexcept; @@ -1523,6 +1526,8 @@ @\exposconcept{weakly-equality-comparable-with}@; // see \ref{concept.equalitycomparable} \end{itemdecl} +\newpage + \begin{itemdescr} \pnum Let \tcode{s} and \tcode{i} be values of type \tcode{S} and @@ -2423,8 +2428,7 @@ \begin{codeblock} template concept @\deflibconcept{indirectly_movable}@ = - @\libconcept{indirectly_readable}@ && - @\libconcept{indirectly_writable}@>; + @\libconcept{indirectly_readable}@ && @\libconcept{indirectly_writable}@>; \end{codeblock} \pnum @@ -2542,9 +2546,7 @@ \begin{codeblock} template concept @\deflibconcept{permutable}@ = - @\libconcept{forward_iterator}@ && - @\libconcept{indirectly_movable_storable}@ && - @\libconcept{indirectly_swappable}@; + @\libconcept{forward_iterator}@ && @\libconcept{indirectly_movable_storable}@ && @\libconcept{indirectly_swappable}@; \end{codeblock} \rSec3[alg.req.mergeable]{Concept \cname{mergeable}} @@ -2910,6 +2912,8 @@ the ending and starting positions of \tcode{i}. \end{itemdescr} +\newpage + \rSec3[range.iter.op.distance]{\tcode{ranges::distance}} \indexlibraryglobal{distance}% \begin{itemdecl} @@ -3477,6 +3481,8 @@ \tcode{x.base() < y.base()}. \end{itemdescr} +\newpage + \indexlibrarymember{operator<=}{reverse_iterator}% \begin{itemdecl} template @@ -4690,8 +4696,10 @@ void fun(ForwardIterator begin, ForwardIterator end); list s; + // populate the list \tcode{s} using CI = common_iterator::iterator>, default_sentinel_t>; + // call \tcode{fun} on a range of 10 ints fun(CI(counted_iterator(s.begin(), 10)), CI(default_sentinel)); \end{codeblock} @@ -5108,6 +5116,8 @@ a range of $N$ elements starting at a given position without needing to know the end position a priori. +\newpage + \pnum \begin{example} \begin{codeblock}