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

[variant.visit] qualify std::forward for consistency #1895

Merged
merged 2 commits into from Jan 4, 2018

Conversation

CaseyCarter
Copy link
Contributor

...because Library always qualifies move and forward.

Also, my editor hates extra newlines at end-of-file.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jan 2, 2018

Good in principle; have you messed around with the linebreaking at all to see if the manual hints can be removed?

@tkoeppe
Copy link
Contributor

tkoeppe commented Jan 2, 2018

Could you please add a Travis check for trailing newlines to prevent future regressions?

@CaseyCarter
Copy link
Contributor Author

Good in principle; have you messed around with the linebreaking at all to see if the manual hints can be removed?

I had not. The \tcode is almost a full column width long now, I think it looks better as a code block:

image

Could you please add a Travis check for trailing newlines to prevent future regressions?

Sure.

\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}
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

@tkoeppe tkoeppe Jan 5, 2018

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.

@tkoeppe tkoeppe merged commit 5c2c9d3 into cplusplus:master Jan 4, 2018
@CaseyCarter CaseyCarter deleted the vv_fix branch January 4, 2018 18:01
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