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

[lib] Remove 'Constructs an object of type ...' phrases #3507

Merged
merged 1 commit into from Nov 25, 2019

Conversation

jensmaurer
Copy link
Member

@jensmaurer jensmaurer commented Nov 21, 2019

for constructors; this effect is implied by the
core language. Only simple phrases are removed;
more complex sentence structures are left unchanged.

Partially addresses #3506.

source/time.tex Outdated Show resolved Hide resolved
source/time.tex Outdated Show resolved Hide resolved
source/utilities.tex Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
source/time.tex Outdated Show resolved Hide resolved
source/future.tex Outdated Show resolved Hide resolved
source/future.tex Outdated Show resolved Hide resolved
source/iostreams.tex Outdated Show resolved Hide resolved
source/iostreams.tex Outdated Show resolved Hide resolved
source/iostreams.tex Outdated Show resolved Hide resolved
source/iostreams.tex Outdated Show resolved Hide resolved
@@ -4241,8 +4228,7 @@
\begin{itemdescr}
\pnum
\effects
Constructs a \tcode{seed_seq} object
as if by default-constructing its member \tcode{v}.
Default-constructs its member \tcode{v}.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Default-initializes the member \tcode{v}." would be better here, but we should instead noexcept = default the declaration in the class synopsis and remove the detailed specification completely:

  • defaulted constructors default-initialize non-static data members with no default member initializers, so we needn't spell out that v is default-initialized
  • vector's default constructor is conditionally noexcept(noexcept(Allocator())), which is true for std::allocator and therefore for v's type vector<result_type>, so this constructor should be noexcept rather than "Throws: Nothing." per LWG policy. (I assume no one has noticed that we could strengthen noexcept here since the conditional noexcept was added to vector's default constructor.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Please open a separate editorial issue for that. Let's not accumulate too much burden on this one.

source/time.tex Outdated
initializing \tcode{zone_} with \tcode{traits::default_zone()} and
default constructing \tcode{tp_}.
Initializes \tcode{zone_} with \tcode{traits::default_zone()} and
default constructs \tcode{tp_}.
Copy link
Contributor

Choose a reason for hiding this comment

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

default-initializes? (There are several occurrences of "default constructs" herein that I would prefer to be "default-initializes", I won't mark the remainder under the expectation that we'll consistently change all or none of them.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Make it a separate editorial issue, please. I'm trying hard to limit this pull request to the "blatantly obvious" changes, ignoring all the other wording nightmares in this section.

@@ -5896,7 +5892,7 @@
\begin{itemdescr}
\pnum
\effects
Constructs an object of class \tcode{bitset<N>} as if by:
As if by:
Copy link
Contributor

Choose a reason for hiding this comment

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

LWG has been replacing "as if by:" with "Equivalent to:" in newer wording, but for cases like this (constructor is equivalent to other constructor) we simply use constructor delegation in the class synopsis and avoid prose specification.

Copy link
Member Author

Choose a reason for hiding this comment

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

-> separate editorial issue, please.

Copy link
Member

Choose a reason for hiding this comment

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

We have historically considered changing "As if by" to "Equivalent to" to not be editorial, because "Equivalent to" has implications for the other descriptive elements as described in [structure.specifications]p4 which are not (clearly) implied by "As if by" wording.

source/utilities.tex Outdated Show resolved Hide resolved
@jensmaurer jensmaurer added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Nov 24, 2019
for constructors; this effect is implied by the
core language.  Only simple phrases are removed;
more complex sentence structures are left unchanged.
@jensmaurer
Copy link
Member Author

Rebased.

@jensmaurer jensmaurer removed the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Nov 24, 2019
@zygoloid zygoloid merged commit bffe678 into cplusplus:master Nov 25, 2019
@jensmaurer jensmaurer deleted the c29 branch November 26, 2019 19:32
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

4 participants