OSDN Git Service

PR c++/29363
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / unify11.C
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin: PR c++/40684
3 // { dg-options "-std=c++0x" }
4
5 struct A
6 {
7 };
8
9 template <typename S, typename T, typename U, typename S::v = &S::v::s>
10 typename S::A
11 foo (S c, T t, U u)
12 {
13 }
14
15 struct B
16 {
17   struct C
18   {
19     template <typename U>
20     C (U t)
21     {
22       A a;
23       A b = foo (this, a, t); // { dg-error "no matching function" }
24     }
25   } c;
26   B () : c (A ())
27   {
28   }
29 };
30
31 int
32 main ()
33 {
34   B f;
35 }
36