[libcxx-commits] [libcxx] [libc++][RFC] Document when to apply [[nodiscard]] (PR #84000)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 5 08:26:00 PST 2024
mordante wrote:
First of all thanks for working on this!
As mentioned in #83695 there is a paper [P3122R0](https://wg21.link/p3122r0) "[[nodiscard]] should be Recommended Practice" by @jwakely and there is another paper [P2422R0](https://wg21.link/p2422r0) "Remove nodiscard annotations from the standard library specification" that proposes to drop all `[[nodiscard]]`s from the draft.
These papers are likely to be discussed in a few weeks during the Tokyo meeting. So I would propose to wait until that has been discussed; it might affect this RFC. Even when these papers are not accepted we should look at P3122R0 it has recommended practices we could use as guideline in our documentation.
Note I'm in favour of using `[[nodiscard]]` more in libc++ and the direction of these papers.
https://github.com/llvm/llvm-project/pull/84000
More information about the libcxx-commits
mailing list