https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86953
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> --- struct B { double x; bool isfreex; bool isfreey; constexpr bool operator==(const B& other) const noexcept { return (x == other.x) && (isfreex == other.isfreex) && (isfreey == other.isfreey); } constexpr bool operator!=(const B& other) const noexcept { return !(*this == other); } }; int main () { bool b = B{} == B{}; }