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

P2351 Mark all library static cast wrappers as [[nodiscard]] #1041

Open
wg21bot opened this issue May 21, 2021 · 3 comments
Open

P2351 Mark all library static cast wrappers as [[nodiscard]] #1041

wg21bot opened this issue May 21, 2021 · 3 comments
Labels
B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e C++23 Targeted at C++23 IS Ship vehicle: IS LWG Library lwg-pending LWG Chair needs to disposition size - tiny paper size estimate, smaller than small
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented May 21, 2021

P2351R0 Mark all library static cast wrappers as [[nodiscard]] (Hana Dusíková)

@wg21bot wg21bot added the LEWG Library Evolution label May 21, 2021
@wg21bot wg21bot added this to the 2021-telecon milestone May 21, 2021
@brycelelbach brycelelbach added B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e IS Ship vehicle: IS size - medium paper size estimate ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting labels May 26, 2021
@cor3ntin cor3ntin added ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll size - tiny paper size estimate, smaller than small and removed ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting size - medium paper size estimate labels Jul 26, 2021
@cor3ntin
Copy link

This paper was discussed on the mailing list July 6- July 22.

No technical concerns, some discussions about whether this is worth our time.
I recommend it goes straight to electronic polling

@brycelelbach
Copy link

brycelelbach commented Aug 1, 2021

A motion to move this paper from mailing list review to electronic polls was made on 2021-08-01. That motion failed to garner unanimous support, but extensive discussion followed on the mailing list. The chair believes that telecon time is unlikely to meaningfully add to the conversation and will likely not sway people's positions. As such, this paper is proceeding to electronic polling.

@brycelelbach brycelelbach added ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting C++23 Targeted at C++23 and removed ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll labels Aug 1, 2021
@brycelelbach brycelelbach added ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review and removed ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting labels Sep 2, 2021
@brycelelbach brycelelbach added the expedited-library-evolution-electronic-poll Papers that were reviewed on the mailing list and then advanced directly to electronic polling. label Sep 18, 2021
@brycelelbach
Copy link

2021 September Library Evolution Polls

P2451: 2021 September Library Evolution Poll Outcomes

Poll 4: Send P2351R0 (Mark All Library Static Cast Wrappers As [[nodiscard]]) to Library Working Group for C++23, classified as an improvement of an existing feature (P0592R4 bucket 2 item).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
7 9 4 2 2

Outcome: Weak consensus in favor.

Selected Comments

I encourage explicit [[nodiscard]] markings in the standard -- they help catch real world bugs!

— Strongly Favor

This matches existing practice and make the intent of these function clearer. It has a very low burden on the standard and implementers.

— Strongly Favor

Although [I] would prefer [[nodiscard]] be applied liberally to the standard library, [I] would also be satisfied with it as [Quality of Implementation (QoI)].

— Weakly Favor

While the direct value of including attributes with no reliable, normative effect in the standard is questionable, there is a very real indirect effect: if implementations can expect that other implementations will issue warnings for the same code, they are less likely to withhold the warnings for compatibility reasons.

— Weakly Favor

I find the whole idea of [[nodiscard]] backwards. The compiler should warn by default on discarded return values. I should have to do something special to get it to stop emitting a warning. If the compiler is doing its job, then nothing should need [[nodiscard]] decoration. On the other hand, I wouldn't mind if the standard library did this.

— Neutral

I am generally in favour of tightening the requirements of [Quality of Implementation (QoI)] to standardize high quality implementations. However In this case I think we can get the result with out prescribing all details.

— Neutral

I think blanket wording saying which functions should be treated as nodiscard would be superior to explicitly adding it to individual declarations.

— Weakly Against

It seems a waste of valuable LWG time to forward [[nodiscard]] papers without first having reached agreement on whether we want such annotations in the standard at all. I also have serious reservations about the process employed where the mailing list discussion was supposedly tabled until the end of the year, then a month later the paper is suddenly submitted to electronic polling.

— Strongly Against

* Has no normative effect.
* Poor use of LEWG time (and it won't stop with just this [[nodiscard]] paper).
* Poor use of WG21 time.
* There are many (if not all) bucket 3 items I would much rather have before this.

  • No general rules for applying [[nodiscard]].
    * Moves the standard towards being prescriptive, not descriptive.
    * Much better to have a standing document of these things instead of littering the standard with them.
    * Controversial papers should not skip LEWG telecons and go straight to electronic polling.
    * This is something implementors should be doing instead of spending valuable committee time legislating it.

— Strongly Against

@brycelelbach brycelelbach removed LEWG Library Evolution ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review expedited-library-evolution-electronic-poll Papers that were reviewed on the mailing list and then advanced directly to electronic polling. labels Sep 25, 2021
@jensmaurer jensmaurer modified the milestones: 2021-telecon, 2022-telecon Jan 1, 2022
@brycelelbach brycelelbach added the expedited-library-evolution-electronic-poll Papers that were reviewed on the mailing list and then advanced directly to electronic polling. label Feb 23, 2022
@jensmaurer jensmaurer modified the milestones: 2022-telecon, 2023-02 Jan 25, 2023
@jensmaurer jensmaurer removed this from the 2023-02 milestone Mar 31, 2023
@jensmaurer jensmaurer added this to the 2023-telecon milestone Mar 31, 2023
@jensmaurer jensmaurer removed the C++23 Targeted at C++23 label Nov 6, 2023
@jensmaurer jensmaurer modified the milestones: 2023-telecon, 2024-telecon Mar 19, 2024
@inbal2l inbal2l added LWG Library lwg-pending LWG Chair needs to disposition C++23 Targeted at C++23 and removed expedited-library-evolution-electronic-poll Papers that were reviewed on the mailing list and then advanced directly to electronic polling. labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e C++23 Targeted at C++23 IS Ship vehicle: IS LWG Library lwg-pending LWG Chair needs to disposition size - tiny paper size estimate, smaller than small
Projects
None yet
Development

No branches or pull requests

5 participants