summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/qualttp5.C
blob: 8bca7f696601f674e75e019fecf49ecb42293214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (C) 2001 Free Software Foundation
// Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
// { dg-do compile }

template <class U> struct A
{
	template <class T> class B {}; // { dg-message "operator=|no known conversion" }
};

template <template <class> class TT> void f()
{
	TT<int> y;
	y = 0; // { dg-error "no match" }
	// { dg-message "candidate" "candidate note" { target *-*-* } 13 }
}

template <class T> struct C
{
	void g() { f<A<T>::template B>(); } // { dg-message "instantiated" }
};

int main()
{
	C<int> c;
	c.g(); // { dg-message "instantiated" }
}