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
[variant.visit] qualify std::forward for consistency #1895
Conversation
Good in principle; have you messed around with the linebreaking at all to see if the manual hints can be removed? |
Could you please add a Travis check for trailing newlines to prevent future regressions? |
I had not. The
Sure. |
source/utilities.tex
Outdated
\tcode{forward<Variants>(vars))...);}\iref{func.require}. | ||
Let \tcode{is...} be \tcode{vars.index()...}. Returns: | ||
\begin{codeblock} | ||
@\placeholdernc{INVOKE}@(std::forward<Visitor>(vis), get<is>(std::forward<Variants>(vars))...); // see \ref{func.require} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the semicolon. It has always been a mistake; we return expressions, not statements. Other instances of Returns: plus codeblock also never use a semicolon.
I could further question whether this shouldn't be a Returns: element rather than an Effects: one, but let's leave that as is for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I had similar thoughts about this being an odd use of Effects
, and also decided it wasn't worth touching for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, leave it with me. I'll discuss it with Richard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the semi-colon consistent with the third form at https://github.com/cplusplus/draft/wiki/Specification-Style-Guidelines#writing-effects-in-a-function-description ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwakely: Only if we actually said return
. But we don't. But I think we should change this to use a Returns: element anyway, non?
There's no semicolon in the Returns: example below.
...because Library always qualifies
move
andforward
.Also, my editor hates extra newlines at end-of-file.