[utility.syn, flat.map.defn] Remove all [[nodiscard]] from library wording #7248
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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...)