[libcxx-commits] [libcxx] [libc++] mark `std::expected` as `nodiscard` (PR #130820)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 26 13:10:46 PDT 2025


huixie90 wrote:

Is there any paper adding ā€˜[[candiscard]]’ floating around ? I’d much prefer to making it possible for the function owner to make the function possible to discard the returned value, before we adding the blanket nodiscard for everyone.  Imagine if we make printf nodiscard for the reason of not checking the error code? It will simply end up with lots of #pragma gcc diagnostic 

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


More information about the libcxx-commits mailing list