[libcxx-commits] [libcxx] [libc++] mark `std::expected` as `nodiscard` (PR #130820)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 11 12:39:51 PDT 2025
================
@@ -58,7 +58,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Err>
-class expected;
+class [[nodiscrad]] expected;
----------------
H-G-Hristov wrote:
These are the frozen headers. I don't think you should change them: https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc/77319/55
You probably need to add tests too.
https://github.com/llvm/llvm-project/pull/130820
More information about the libcxx-commits
mailing list