aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/ttp1.C
blob: 7577b5e328079e699085864a7da6a992a040168d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// CWG 150: Matching of template template-arguments excludes compatible
// templates

// { dg-options -fnew-ttp-matching }

template<class T, class U = T> class B { /* ... */ };
#if __cpp_variadic_templates
template <class ... Types> class C { /* ... */ };
#endif
template<template<class> class P, class T> void f(P<T>);

int main()
{
  f(B<int>());
  f(B<int,float>());		// { dg-error "no match" }
#if __cpp_variadic_templates
  f(C<int>());
#endif
}