Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet more cherry-picks for c++20 #4227

Merged
merged 7 commits into from Sep 24, 2020
Merged

Conversation

tkoeppe
Copy link
Contributor

@tkoeppe tkoeppe commented Sep 23, 2020

@jwakely, @CaseyCarter your input is most welcome. See also #4220 (comment) for a complete list of candidate commits.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Sep 23, 2020

I might perhaps like to drop the "wrap synopsis in namespace" commit, just because it's a bit large.

@jwakely
Copy link
Member

jwakely commented Sep 23, 2020

I might perhaps like to drop the "wrap synopsis in namespace" commit, just because it's a bit large.

It's large, but if you ignore whitespace (git show -b 657711448680) it's easier to review as safe:

--- a/source/strings.tex
+++ b/source/strings.tex
@@ -4020,9 +4020,10 @@ are available when \tcode{<string_view>} is included.
 \indexlibrarymember{size_type}{basic_string_view}%
 \indexlibrarymember{difference_type}{basic_string_view}%
 \begin{codeblock}
-template<class charT, class traits = char_traits<charT>>
-class basic_string_view {
-public:
+namespace std {
+  template<class charT, class traits = char_traits<charT>>
+  class basic_string_view {
+  public:
     // types
     using traits_type            = traits;
     using value_type             = charT;
@@ -4125,14 +4126,15 @@ public:
                                          size_type n) const;
     constexpr size_type find_last_not_of(const charT* s, size_type pos = npos) const;
 
-private:
+  private:
     const_pointer data_;        // \expos
     size_type size_;            // \expos
-};
+  };
 
-// \ref{string.view.deduct}, deduction guide
-template<class It, class End>
+  // \ref{string.view.deduct}, deduction guide
+  template<class It, class End>
     basic_string_view(It, End) -> basic_string_view<iter_value_t<It>>;
+}
 \end{codeblock}
 
 \pnum

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Sep 23, 2020

After this speculative PR, the remaining unused commits would be as follows:

-[expr.cond] Clarify what "subject to the constraint" means.
-[thread.mutex.requirements] Harmonize wording for try_lock.
-[diff.mods.to.declarations] Also mention 'byte' and 'to_integer'. (#4145)
-[numeric.ops.gcd,numeric.ops.lcm] Say "other than cv bool" (#4147)
-[expr.post] Fix scope of \opt markup (#4142)
-[span.iterators] Specify iterator value_type and reference (#4062)
-[lib] Harmonize presentation of "The expression in...is equivalent to" (#4108)
-[format.syn] Avoid forward references (#4129)
-[memory.syn,specialized.algorithms] Append "-for" to exposition-only concept "no-throw-sentinel" (#4100)
-[check.sh] Escape backslash in awk program to silence warning (#4099)
-[lex.ccon] Remove redundant nested \tcode. (#4094)
-[lib] Canonicalize order of library descriptive elements. (#4067)
-[expr.reinterpret.cast] Fix note on round-tripping pointer values. (#4080)
-[stmt.pre, re.grammar, gram] Use a separate bnf environment for each nonterminal. (#4070)
-[alg.is.permutation] Rephrase to simplify (#4071)
-[basic.fundamental] Use canonical types in [tab:basic.fundamental.width] (#4057)
-[algorithms.general] Add [algorithms.results] to summary table (#4020)
-[range.refinements] Use 'customization point object' for ranges::data (#3993)
-[iterator.cust] Use 'customization point object' in heading (#3994)
-[concept.swappable] Use 'customization point object' for ranges::swap (#3992)
-[class.mem] Add cross-reference for data member order (#3990)
-[range.elements.iterator] Fix typo in declaration of  operator<= (#3981)
-[iterator.concepts.general] Remove synthesizeable operator!= in example. (#3950)
-[string.conversions] Replace comparisons of a pointer against 0 with comparision against nullptr, for consistency with other parts of the library
-[basic.type.qualifier] Incomplete and complete object types are just object types
-[alg.clamp] Add missing calls to invoke (#3902)
-[iterator.synopsis,reverse.iter.nonmember] Simplify declaration of reverse_iterator's non-member operator+
-[expr.const] Change "dynamic cast" to "dynamic_cast" and move throw-expression to its own item (#3919)
-[temp.class.spec] Remove unused hyphenation point (#3928)
-[except.handle] Simplify void pointer cv-qualification

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Sep 23, 2020

I added dd52b47 to this PR.

Copy link
Member

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good assuming someone has checked there are no unexpected changes in the big strings.tex diff.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Sep 24, 2020

@jwakely posted a diff that disregards whitespace and shows that this is really just adding the namespace and indenting everything inside.

@tkoeppe tkoeppe merged commit 7d8c637 into cplusplus:c++20 Sep 24, 2020
@tkoeppe tkoeppe deleted the c++20-extras branch September 24, 2020 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants