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

[stmt.return], [stmt.return.coroutine] update notes re implicit move #5783

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Quuxplusone
Copy link
Contributor

These notes probably should have been changed when P1825 was adopted.

@tkoeppe
Copy link
Contributor

tkoeppe commented Aug 23, 2022

@jensmaurer: I'd like a core opinion for this, would you have one or could recommend someone?

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

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

I think there's some overall improvement lurking in the shadows for this pull request, but we're not there yet.

source/statements.tex Outdated Show resolved Hide resolved
source/statements.tex Outdated Show resolved Hide resolved
A copy operation associated with a \tcode{return} statement can be elided or
converted to a move operation if an automatic storage duration variable is returned\iref{class.copy.elision}.
The copy operation associated with a \tcode{return} statement can be elided or
converted to a move operation if an implicitly movable entity\iref{class.copy.elision} is returned.
Copy link
Member

Choose a reason for hiding this comment

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

(yes, pre-existing, but while we're touching this)

It seems unclear whether the "if" applies to just the "converted to a move operation" part or to the entire "can be elised or converted to a move operation".

source/statements.tex Outdated Show resolved Hide resolved
source/statements.tex Outdated Show resolved Hide resolved
@@ -913,6 +913,10 @@
\item
If the operand is a \grammarterm{braced-init-list} or an expression of non-\keyword{void} type,
\placeholder{S} is \placeholder{p}\tcode{.return_value(}\grammarterm{expr-or-braced-init-list}{}\tcode{)}.
\begin{note}
The overload resolution of \placeholder{S} is affected
Copy link
Contributor Author

Choose a reason for hiding this comment

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

s/of/inside/?

These notes probably should have been changed when P1825 was adopted.
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

3 participants