https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86000
--- Comment #1 from Hubert Matthews <gcc-bugs at oxyware dot com> --- template <typename T> int f() { bool check = requires { 3 > 4; }; if (check) return 1; else return 2; } compiles cleanly and gives the expected result. This is essentially the same code but with the check performed separately and stored in an intermediate variable.