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

Add [[nodiscard]] to algorithms and views #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bstaletic
Copy link
Contributor

All views are now marked with [[nodiscard]], although some things may have been missed.
For algorithms, [[nodiscard]] wasn't added to:

  1. In-place, modifying algorithms - the caller often knows what to expect and the return value isn't that useful.
  2. Algorithms that take an output iterator - that output iterator might be ostream_iterator<T>(cout).
  3. next_permutation and prev_permutation - the in_found_result::found seems useful, but I wasn't sure if it is useful enough.

All views are now marked with `[[nodiscard]]`, although some things may
have been missed.
For algorithms, `[[nodiscard]]` wasn't added to:

1. In place algorithms
2. Algorithms that take an output iterator.
3. `next_permutation` and `prev_permutation`.
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.

None yet

1 participant