1 // RUN:  %clang_cc1 -std=c++2a -frelaxed-template-template-args -verify %s
2 
3 template<typename T> concept C = T::f();
4 // expected-note@-1{{similar constraint}}
5 template<typename T> concept D = C<T> && T::g();
6 template<typename T> concept F = T::f();
7 // expected-note@-1{{similar constraint expressions not considered equivalent}}
8 template<template<C> class P> struct S1 { }; // expected-note 2{{'P' declared here}}
9 
10 template<C> struct X { };
11 
12 template<D> struct Y { }; // expected-note{{'Y' declared here}}
13 template<typename T> struct Z { };
14 template<F> struct W { }; // expected-note{{'W' declared here}}
15 
16 S1<X> s11;
17 S1<Y> s12; // expected-error{{template template argument 'Y' is more constrained than template template parameter 'P'}}
18 S1<Z> s13;
19 S1<W> s14; // expected-error{{template template argument 'W' is more constrained than template template parameter 'P'}}
20 
21 template<template<typename> class P> struct S2 { };
22 
23 S2<X> s21;
24 S2<Y> s22;
25 S2<Z> s23;
26 
27 template <template <typename...> class C>
28 struct S3;
29 
30 template <C T>
31 using N = typename T::type;
32 
33 using s31 = S3<N>;
34 using s32 = S3<Z>;
35