https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94186
Bug ID: 94186 Summary: compiler incorrectly accepts a requires clause with predicate of non-bool type Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: akrzemi1 at gmail dot com Target Milestone: --- The following program should fail to compile in C++20 because the type of the predicate in requires-clause is not bool. ``` template <typename T> struct is_small { enum { value = sizeof(T) <= 4 }; }; template <typename T> requires is_small<T>::value void fun(T) {} template <typename T> void fun(T) {} int main() { fun(1); // expected hard compiler error } ```