Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[temp] Replace 'could' and 'might' #4359

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

Merged
merged 1 commit into from
Nov 13, 2020
Merged

Conversation

jensmaurer
Copy link
Member

as directed by ISO/CS.

Partially addresses #4319

one class \tcode{List<T>} for every type \tcode{T},
each describing a linked list of elements of type \tcode{T}.
Similarly, a class template \tcode{Array} describing a contiguous,
dynamic array might be defined like this:
dynamic array can be defined like this:
\begin{codeblock}
template<class T> class Array {
T* v;
Copy link
Member

Choose a reason for hiding this comment

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

(Can't comment on this directly because github is terrible.) There's a bogus "may" a few lines below that should be a "can". ISO/CS noticed and called out this one in our discussion so we need to fix it.

Copy link
Member Author

Choose a reason for hiding this comment

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

may -> can

Comment on lines 8681 to 8682
f(a,b); // error: \tcode{T} can be \tcode{A} or \tcode{B}
f(b,a); // error: \tcode{T} can be \tcode{A} or \tcode{B}
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is right; it can't be either because this is ill-formed. How about:

"error: T deduced as both A and B"

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 8702 to 8703
f(g2); // error: \tcode{T} can be \tcode{char} or \tcode{int}
f(g3); // error: \tcode{U} can be \tcode{char} or \tcode{float}
Copy link
Member

Choose a reason for hiding this comment

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

Similarly here.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

as directed by ISO/CS.
@jensmaurer
Copy link
Member Author

applied, squashed + force-pushed

@jensmaurer jensmaurer requested a review from zygoloid November 13, 2020 07:56
@zygoloid zygoloid merged commit 835c137 into cplusplus:c++20 Nov 13, 2020
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.

2 participants