https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89568
Bug ID: 89568
Summary: constexpr functions are implicitly noexcept
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Short repro:
struct Y { };
bool operator<(Y a, Y b) { return false; }
constexpr bool operator>(Y a, Y b) { return false; }
static_assert(!noexcept(Y{} > Y{}));
static_assert(!noexcept(Y{} < Y{}));
Neither case should be noexcept, since neither function is marked noexcept, but
the first static assertion triggers.