Skip to content

Conversation

burblebee
Copy link
Contributor

@burblebee burblebee commented Feb 21, 2020

…range-y" view adaptors

Also fixes NB DE 288 and US 272 (C++20 CD).

[range.counted] Moved note to work with new wording.

Fixes #3726.
Fixes cplusplus/papers#503.
Fixes cplusplus/nbballot#284.
Fixes cplusplus/nbballot#268.

Notes:

  • [ranges] FYI - fixed capitalization.

Comment on lines +4098 to +4215
If \tcode{decltype((F))} does not model
\tcode{\libconcept{convertible_to}<D>},
\tcode{views::take(E, F)} is ill-formed.
Copy link
Member

Choose a reason for hiding this comment

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

"model" + ill-formed don't work together; advised LWG in http://lists.isocpp.org/lib/2020/02/15451.php

Comment on lines +4493 to +4597
If \tcode{decltype((F))} does not model
\tcode{\libconcept{convertible_to}<D>},
\tcode{views::drop(E, F)} is ill-formed.
Copy link
Member

Choose a reason for hiding this comment

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

"model" + ill-formed don't work together; advised LWG in http://lists.isocpp.org/lib/2020/02/15451.php

Comment on lines +5767 to +5840
If \tcode{decltype((F))} does not model
\tcode{\libconcept{convertible_to}<D>},
\tcode{views::counted(E, F)} is ill-formed.
Copy link
Member

Choose a reason for hiding this comment

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

"model" + ill-formed don't work together; advised LWG in http://lists.isocpp.org/lib/2020/02/15451.php

then \tcode{((void) F, \placeholdernc{decay-copy}(E))};

\item
otherwise, if \tcode{T} models
Copy link
Member

Choose a reason for hiding this comment

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

another "models"; see http://lists.isocpp.org/lib/2020/02/15452.php

(similarly for the other occurrences below)

This seems to make the entire paper unimplementable, and it thus should be rejected.

@jensmaurer
Copy link
Member

@zygoloid , this paper incorrectly uses "models" pervasively, which makes it essentially unimplementable. I've emailed LWG, but I'm not sure if anything here can be resurrected editorially.

@jensmaurer jensmaurer added changes requested Changes to the wording or approach have been requested and not yet applied. lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. and removed not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. labels Feb 25, 2020
@jensmaurer
Copy link
Member

P2101R0 (applied with LWG poll 10) adds "If the validity or meaning of a program depends on whether a sequence of template arguments models a concept, and the concept is satisfied but not modeled, the program is ill-formed, no diagnostic required."
Thus the phrasing "If X does not model Y, the program is ill-formed" sort-of makes sense, although I find the outcome to be bad in several respects.

@jensmaurer jensmaurer removed changes requested Changes to the wording or approach have been requested and not yet applied. lwg Issue must be reviewed by LWG. labels Feb 25, 2020
@zygoloid zygoloid force-pushed the motions-2020-02-lwg-24 branch 2 times, most recently from 1367c8e to 462a47b Compare March 4, 2020 02:08
…range-y" view adaptors

Also fixes NB DE 288 and US 272 (C++20 CD).

[range.counted] Moved note to work with new wording.
@zygoloid zygoloid force-pushed the motions-2020-02-lwg-24 branch from 462a47b to 12a6300 Compare March 4, 2020 02:09
@zygoloid
Copy link
Member

zygoloid commented Mar 4, 2020

Thus the phrasing "If X does not model Y, the program is ill-formed" sort-of makes sense, although I find the outcome to be bad in several respects.

I encountered this when editing in a different paper. I find the current approach quite problematic from a comprehensibility standpoint, and I said this in person at Prague too, but it's too late in the cycle to fix this for C++20 (would require someone going through all the library wording and fixing all the places that say "models" when they mean to apply a machine-checkable set of requirements).

@zygoloid zygoloid merged commit b8e3922 into master Mar 4, 2020
@jensmaurer jensmaurer deleted the motions-2020-02-lwg-24 branch February 12, 2021 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment