Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / qualttp5.C
blob8bca7f696601f674e75e019fecf49ecb42293214
1 // Copyright (C) 2001 Free Software Foundation
2 // Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3 // { dg-do compile }
5 template <class U> struct A
7         template <class T> class B {}; // { dg-message "operator=|no known conversion" }
8 };
10 template <template <class> class TT> void f()
12         TT<int> y;
13         y = 0; // { dg-error "no match" }
14         // { dg-message "candidate" "candidate note" { target *-*-* } 13 }
17 template <class T> struct C
19         void g() { f<A<T>::template B>(); } // { dg-message "instantiated" }
22 int main()
24         C<int> c;
25         c.g(); // { dg-message "instantiated" }