// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template concept True = true; template concept Foo = True; template concept Bar = Foo; template requires Bar struct S { }; template requires Bar && true struct S { }; template concept True2 = sizeof(T) >= 0; template concept Foo2 = True2; // expected-error@-1{{'type name' declared as a pointer to a reference of type 'type-parameter-0-0 &'}} template concept Bar2 = Foo2; // expected-note@-1{{while substituting into concept arguments here; substitution failures not allowed in concept arguments}} template requires Bar2 struct S2 { }; // expected-note@-1{{template is declared here}} template requires Bar2 && true struct S2 { }; // expected-error@-1{{class template partial specialization is not more specialized than the primary template}} // expected-note@-2{{while calculating associated constraint of template 'S2' here}} namespace type_pack { template concept C1 = ((sizeof(Args) >= 0) && ...); template concept C2 = C1; template constexpr void foo() requires C2 { } template constexpr void foo() requires C1 && true { } static_assert((foo(), true)); } namespace template_pack { template struct S1 {}; template struct S2 {}; template typename... Args> concept C1 = ((sizeof(Args) >= 0) && ...); template typename A, template typename... B> concept C2 = C1; template typename T> constexpr void foo() requires C2 { } template typename T> constexpr void foo() requires C1 && true { } static_assert((foo(), true)); } namespace non_type_pack { template concept C1 = ((Args >= 0) && ...); template concept C2 = C1; template constexpr void foo() requires C2 { } template constexpr void foo() requires C1 && true { } static_assert((foo<1>(), true)); }