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

[temp.arg.nontype] Use struct instead of class to make example valid #2339

Merged
merged 1 commit into from Oct 9, 2018

Conversation

ldionne
Copy link
Contributor

@ldionne ldionne commented Sep 23, 2018

This is an editorial fix.

P0732R2 was merged in Rapperswil, but one example is invalid because the constructor for A is private, so it can't be constructed from the string literal.

P0732R2 [1] was merged in Rapperswil, but one example is invalid because
the constructor for A is private, so it can't be constructed from the
string literal.

[1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0732r2.pdf
@jensmaurer
Copy link
Member

jensmaurer commented Sep 23, 2018

Looks good.

@cpplearner
Copy link
Contributor

Is auto operator<=>(A, A) = default; valid? I think it should be friend auto operator<=>(A, A) = default; or auto operator<=>(A) = default;.

@ldionne
Copy link
Contributor Author

ldionne commented Sep 23, 2018

I don't think it is, but funnily enough it is used in many many places in the document. A separate fix is probably better for that.

@zygoloid
Copy link
Member

zygoloid commented Oct 9, 2018

Is auto operator<=>(A, A) = default; valid? I think it should be friend auto operator<=>(A, A) = default; or auto operator<=>(A) = default;.

Those are all ill-formed. One must also use const A& as the parameter type.

@zygoloid zygoloid merged commit 9a9a490 into cplusplus:master Oct 9, 2018
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

4 participants