[libcxx-commits] [libcxx] [libc++][RFC] Document when to apply [[nodiscard]] (PR #84000)

Jonathan Wakely via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 5 11:17:08 PST 2024


jwakely wrote:

The whole point of my [P3122R0](https://wg21.link/p3122r0) paper is that I think implementations should make their own decisions about where to use nodiscard. The standard should do no more than make some vague recommendations, and definitely *not* try to standardize where it should be used (or even worse, standardize where it should not be used).

So I am very pleased to see this change and the start of a discussion. Please don't wait for WG21 to specify nodiscard on individual functions or on some minimal "low effort" set of functions.

https://github.com/llvm/llvm-project/pull/84000


More information about the libcxx-commits mailing list