gcc/testsuite/g++.dg/concepts/template-parm12.C
raw| 1 | // { dg-do compile { target c++17 } } |
| 2 | // { dg-options "-fconcepts" } |
| 3 | // Conceptized version of template/ttp23.C |
| 4 | |
| 5 | template <class T> concept Foo = true; |
| 6 | |
| 7 | template <typename T> struct A {}; |
| 8 | |
| 9 | template <template <Foo> class P> |
| 10 | struct B { |
| 11 | template <template <Foo> class Q> |
| 12 | friend bool foo (const B<Q>& a); |
| 13 | }; |
| 14 | |
| 15 | template <template <typename> class Q> |
| 16 | bool foo (const B<Q>& a); |
| 17 | |
| 18 | void bar () { |
| 19 | B<A> a; |
| 20 | foo (a); // { dg-error "call of overloaded" } |
| 21 | } |