https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116866
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.j.odwyer at gmail dot com --- Comment #6 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> --- Bug #119197 is related: it asks for `std::expected` to be marked [[nodiscard]]. Microsoft STL has marked their `std::expected`; and in the same commit they marked all their exception types as well. That is, Microsoft has adopted the direction given in jwakely's comment #3. I think libstdc++ should follow suit (which would also fix bug #119197).