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

[meta.logical] clarify short-circuiting property #2550

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jwakely
Copy link
Member

@jwakely jwakely commented Dec 3, 2018

This implements the clarification I suggested in #2548 (comment) (because if Bj is not a template then talking about "instantiation of `Bj::value" doesn't make sense) and the improvement to the inequality that Thomas suggested at #2549 (comment)

It also adds an example showing a consequence of this property.

source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
@jwakely jwakely force-pushed the meta.logical-inequality branch 2 times, most recently from 5e4b9a2 to ee8ebb4 Compare December 3, 2018 16:09
source/utilities.tex Outdated Show resolved Hide resolved
source/utilities.tex Outdated Show resolved Hide resolved
@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label Dec 7, 2018
@jensmaurer
Copy link
Member

@jwakely: Ping.

@jensmaurer
Copy link
Member

@jwakely: Ping^2.

@jwakely jwakely self-assigned this May 28, 2019
@jwakely
Copy link
Member Author

jwakely commented May 31, 2019

See the screengrab at #2550 (comment) for the proposed rewrite. I haven't pushed that as a commit yet, as I'd like feedback first.

@jensmaurer jensmaurer removed the changes requested Changes to the wording or approach have been requested and not yet applied. label Jun 6, 2019
@zygoloid zygoloid added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Oct 6, 2019
@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Sep 20, 2020
@jensmaurer
Copy link
Member

Looks like this needs some decision to go with @jwakely's suggestion (or not).

@jensmaurer
Copy link
Member

Editorial meeting: The rephrasing seems like a clarification, but it's normatively unclear whether "declaration" or "definition" is the right constraint here. This is not subsumed by general wording elsewhere, because this exactly delineates when instantiations happen and when they don't happen, so we need to be precise. Defer to LWG to decide.

@jensmaurer jensmaurer added lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. and removed decision-required A decision of the editorial group (or the Project Editor) is required. labels Dec 4, 2020
@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 22, 2021

@jwakely: could you perhaps schedule an LWG-bug-Monday email slot for tihs?

The type Bj might not be a template, so it doesn't make sense to talk
about instantiation. Use wording similar to that in [temp.inst] p3 which
specifies when a member of a template is implicitly instantiated.
@jwakely jwakely removed the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Apr 20, 2022
@jwakely jwakely marked this pull request as draft April 20, 2022 10:29
@jwakely
Copy link
Member Author

jwakely commented Apr 20, 2022

I've pushed a rewrite that addresses @CaseyCarter's comments and removes the problematic "a definition of Bi::value is required to exist" wording that @zygoloid didn't like. Now it simply says "Instantiation of Bj ::value is required".

source/meta.tex Outdated Show resolved Hide resolved
source/meta.tex Outdated Show resolved Hide resolved
Comment on lines +377 to +378
template<> struct conjunction : true_type { };
template<> struct disjunction : false_type { };
Copy link
Contributor

Choose a reason for hiding this comment

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

These need indexing, too. Consider contributing towards #5111.

Copy link
Member Author

Choose a reason for hiding this comment

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

They're not really necessary since I added "For the specialization conjunction<>, let Bi be true_type." Maybe I should remove them again.

source/meta.tex Outdated
Comment on lines 2189 to 2190
For the specialization \tcode{disjunction<>},
let $\tcode{B}_{i}$ be \tcode{true_type}.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For the specialization \tcode{disjunction<>},
let $\tcode{B}_{i}$ be \tcode{true_type}.

Based on the addition of the explicit specialization to the synopsis, and that only the primary template is present in the itemdecl environment, I believe this is not necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree we only need one or the other. The problem with specifying this via the synopsis is that it's easy to miss among dozens of other declarations. Specifying it here doesn't have that problem.

Comment on lines +2255 to +2256
For the specialization \tcode{disjunction<>},
let $\tcode{B}_{i}$ be \tcode{false_type}.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For the specialization \tcode{disjunction<>},
let $\tcode{B}_{i}$ be \tcode{false_type}.

Based on the addition of the explicit specialization to the synopsis, and that only the primary template is present in the itemdecl environment, I believe this is not necessary.

\begin{note}
This allows types without a \tcode{value} static data member
to be template arguments for \tcode{conjunction}, as long as an
earlier argument evaluates to \tcode{false}, for example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this not an example environment after the notes?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the prose is clarifying the normative text, which is the purpose of a note. The statement is not specific to the example in the code, it's generally true. The example is a specific example showing it. We have lots of notes that include "for example:" like this. But I don't feel strongly about it being a note.

jwakely and others added 2 commits April 20, 2022 14:59
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
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. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants