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

add an example of conversion-type-id containing a placeholder type #424

Closed
zygoloid opened this issue Dec 18, 2014 · 3 comments
Closed

add an example of conversion-type-id containing a placeholder type #424

zygoloid opened this issue Dec 18, 2014 · 3 comments
Assignees

Comments

@zygoloid
Copy link
Member

The standard contains no examples of operator auto or similar; such an example would be helpful, perhaps in [dcl.spec.auto] (maybe in p13, also showing the foo.operator auto() syntax for a call) or in [class.conv.fct] (maybe in p7 along with an example showing an ill-formed conversion function template).

@zygoloid
Copy link
Member Author

[From https://groups.google.com/a/isocpp.org/forum/#!topic/std-discussion/PxWKJFQak2w]

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 23, 2016

See the email thread, there's another nice ill-formed example using the trailing return type syntax.

jensmaurer added a commit to jensmaurer/draft that referenced this issue Nov 23, 2016
A trailing return type is ill-formed, a conversion function with a
deduced return type is fine, but a conversion function template with a
deduced return type is ill-formed.

Fixes cplusplus#424.
@jensmaurer
Copy link
Member

Note that the "No return type" phrasing Richard is referring to in his response is no longer there. I've added an example for trailing-return-type.

@jensmaurer jensmaurer self-assigned this Nov 23, 2016
tkoeppe pushed a commit that referenced this issue Nov 23, 2016
…1104)

A trailing return type is ill-formed, a conversion function with a
deduced return type is fine, but a conversion function template with a
deduced return type is ill-formed.

Fixes #424.
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

No branches or pull requests

3 participants