https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101056
Bug ID: 101056
Summary: std::compare_partial_order_fallback missing the
constraint of "F < E is well-formed"
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
In [cmp#alg-6.3]: Otherwise, if the expressions E == F, E < F, and F < E are
all well-formed and convertible to bool, [...].
#include <compare>
struct E {};
const E e;
E f;
bool operator< (const E&, E&) { return false; }
bool operator==(const E&, E&) { return true; }
auto ord = std::compare_partial_order_fallback(e, f);
https://godbolt.org/z/TTooWPqEz