https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114104
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- I don't care whether GCC synthesizes an operator!= that inherits the nodiscard attribute, or it generates a discarded bool using the built-in !, but there needs to be a warning either way. Currently a handwritten operator!= with the attribute gives better results than letting the compiler do it, and that should not be the case.