<div dir="ltr"><div>Hi folks,</div><div><br></div><div>There's been a lot of requests for `<span style="font-family:monospace">[[nodiscard]]</span>` to be replaced with `<span style="font-family:monospace">_LIBCPP_NODISCARD_EXT`</span> in recent reviews where the standard doesn't explicitly declare an entity with the nodiscard attribute. After some investigation, I've discovered that this feature is confusing and error-prone.<span style="font-family:monospace"> `_LIBCPP_NODISCARD_EXT</span>` is opt-in, which requires users to know about its existence (I certainly didn't until reviewers started asking for it, and even then, didn't expect it to be opt-in), and then has three ways to opt out of its use: <span style="font-family:monospace">`_LIBCPP_DISABLE_NODISCARD_EXT</span>` (global), `<span style="font-family:monospace">-Wno-unused-result</span>` (global), and cast to `<span style="font-family:monospace">void</span>` (local).<br></div><div><br></div><div>Since It's unclear why we want so many toggle options for this feature, <a href="http://eel.is/c++draft/dcl.attr.nodiscard">this attribute doesn't change a user's program</a>, and users already have two <a href="https://godbolt.org/z/hsWo1v5W9">compiler-based opt-out mechanisms</a> for all supported compilers and C++ standards, I think it's reasonable to remove this attribute in favour of the easier-to-use attribute itself.<br></div><div><br></div><div>Kind regards,</div><div><br></div><div>Christopher Di Bella<br></div></div>