Skip to content

[utility.syn, flat.map.defn] Remove all [[nodiscard]] from library wording #7248

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

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

Mick235711
Copy link
Contributor

@Mick235711 Mick235711 commented Sep 5, 2024

After extensive discussion about [[nodiscard]] policy in LEWG, it was agreed that [[nodiscard]] should not appear in the library wording (see SD-9). However, the wording removal paper, P2422R1 (approved in St. Louis, #7110), does not seem to remove all occurrences of [[nodiscard]] in the library clauses due to some recently added [[nodiscard]] annotation (such as those on flat containers’ empty()) being missed.

Therefore, this PR removes all occurrences of [[nodiscard]] in N4988. Those are:

  • 22.2.1 [utility.syn]
  • 24.6.9.2 [flat.map.defn]
  • 24.6.10.2 [flat.multimap.defn]
  • 24.6.11.2 [flat.set.defn]
  • 24.6.12.2 [flat.multiset.defn]
  • 24.7.3.6.1 [mdspan.mdspan.overview] and 24.7.3.6.3 [mdspan.mdspan.members]

After the change, the only mention of [[nodiscard]] in the standard is in examples and Core wording.

(I assumed that this is editorial since it seems likely that these are just missed by P2422's wording...)

@jensmaurer
Copy link
Member

@jwakely , this seems like an editorially-obvious sync operation. What do you think?

@tkoeppe tkoeppe merged commit 0456a32 into cplusplus:main Oct 16, 2024
2 checks passed
@Mick235711 Mick235711 deleted the remove-nodiscard branch October 16, 2024 12:56
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.

4 participants