2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / template / unify11.C
blobc8df94b31ca0ab38cea1793ec16c38a948041782
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin: PR c++/40684
3 // { dg-options "-std=c++0x" }
5 struct A
7 };
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)
15 struct B
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   }
31 int
32 main ()
34   B f;