https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109941
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.j.odwyer at gmail dot com --- Comment #5 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> --- https://quuxplusone.github.io/blog/2024/12/08/should-expected-be-nodiscard/ https://github.com/microsoft/STL/pull/5174 As of this past Friday, Microsoft STL's std::expected is finally marked nodiscard. LLVM/Clang's own `llvm::Expected` type has been marked nodiscard since 2016. I encourage libstdc++ to follow suit, for `expected` specifically. (Personally I'm less sure that nodiscard belongs at all on `error_code` or `errc`; Microsoft doesn't mark those yet. And on the exception hierarchy, which Microsoft also marked last Friday, I think it's harmless and in keeping with Microsoft's aggressive marking strategy, but perhaps not super helpful either.)