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

[basic.string] State class invariants about [data(), data() + size()] in the introduction. #1879

Merged
merged 1 commit into from Jan 2, 2018

Conversation

tkoeppe
Copy link
Contributor

@tkoeppe tkoeppe commented Dec 6, 2017

No description provided.

@tkoeppe tkoeppe added the lwg Issue must be reviewed by LWG. label Dec 6, 2017
@tkoeppe
Copy link
Contributor Author

tkoeppe commented Dec 6, 2017

LWG, @mclow: This PR is a suggestion to modernize the string wording a little bit, following the removal of the string requirement tables in #1876. I'd like to know whether you're interested in this at all, and whether there are further changes you'd like to see in this area.

@@ -1202,8 +1204,7 @@

\pnum
\postconditions
\tcode{data()} is a non-null pointer that is copyable and can have \tcode{0} added
to it, \tcode{size()} is \tcode{0}, and \tcode{capacity()} is an unspecified value.
\tcode{capacity()} is an unspecified value.
Copy link
Member

Choose a reason for hiding this comment

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

From where do we know that size() == 0 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, yes, that should not have been removed. Fixed.

@jensmaurer
Copy link
Member

Looks like an improvement to me.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Dec 6, 2017

I'm adding "is true" to "size() <= capacity() is true", because we don't usually leave boolean values "hanging" like that.

@mclow
Copy link
Contributor

mclow commented Jan 2, 2018

Sent to -lib reflector for feedback.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Jan 2, 2018

LWG reflector discussion is in favour of this change.

@tkoeppe tkoeppe merged commit f7bfd17 into cplusplus:master Jan 2, 2018
@tkoeppe tkoeppe deleted the strintro branch April 2, 2018 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants