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

[defns.valid] Elaborate on cause in example and add cross-references #7366

Closed

Conversation

Eisenwave
Copy link
Contributor

To be honest, all I wanted to do is add a forward reference to [lib.types.movedfrom] to make the relevant section in the library intro easier to find, but that also required some wording changes to the example to make it less awkward.

@jensmaurer
Copy link
Member

I think it's irrelevant how the "valid but unspecified state" was reached; you can always call x.empty(). Thus, I think you can just add the list of cross-references and avoid the rephrasing.

@Eisenwave
Copy link
Contributor Author

I think it's irrelevant how the "valid but unspecified state" was reached; you can always call x.empty(). Thus, I think you can just add the list of cross-references and avoid the rephrasing.

That is true, but keep in mind that this is updating an example. It's not necessary to keep it general; the reader can just infer that this is one possible way that the state is reached.

Also, this allows us to add more cross-references to sections related to move operations, which I see as a slight plus.

If you insist, I can cut the PR down to just adding \iref{lib.types.movedfrom}.

@jensmaurer
Copy link
Member

Your rephrasing gives me the impression that it's important that the "valid but unspecified state" was reached via a move operation, in order to be allowed to call x.empty(). I don't think that impression is helpful.

@Eisenwave Eisenwave force-pushed the defns-valid-reference-lib-intro branch from 5d13e8b to 894e688 Compare November 2, 2024 16:57
@Eisenwave
Copy link
Contributor Author

@jensmaurer is it better with the insertion of "say"? This should clarify that move operations are just one way that the state could have been entered.

@jensmaurer
Copy link
Member

I don't like "say" from a stylistic viewpoint.

You can add a second sentence, though (and leave the first one essentially alone): "The class std::vector is in a valid but unspecified state after being moved from (xrefs)."

Copy link
Member

@jwakely jwakely 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 the original example was better by virtue of being simpler, and I don't think the cross-reference adds anything.

@Eisenwave Eisenwave closed this Nov 3, 2024
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.

3 participants