[libcxx-commits] [libcxx] [libc++] Mark std::expected as nodiscard (PR #139651)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 26 01:51:14 PDT 2025
philnik777 wrote:
> > > Now there is a way to disable the warning.
> >
> >
> > What way?
>
> The programmer can pass `-D_LIBCPP_DISABLE_NODISCARD_EXPECTED=1` to disable the warning. Or do I misunderstand you, @huixie90?
That doesn't allow you to discard on a per-function basis.
https://github.com/llvm/llvm-project/pull/139651
More information about the libcxx-commits
mailing list