// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts" } template concept Boolean = requires(T t) { { t } -> bool; // { dg-error "return-type-requirement is not a type-constraint" } }; template concept C = requires (T t) { { t } -> Boolean; }; template struct X; template requires (! C) struct X { using type = int; }; template requires C struct X { using type = int; }; struct S { using type = char; }; void f() { X::type x; }