// { dg-do compile { target c++20 } } template concept Foo = requires(T t) { foo(t); }; // { dg-error "template instantiation depth" } namespace ns { struct S { }; template requires Foo int foo(T t) { return foo(t); } } int main(int, char**) { return foo<1>(ns::S{}); } // { dg-prune-output "compilation terminated" }