Debian Codegraph @

gcc/testsuite/g++.dg/template/overload11.C

raw
1 // PR c++/39413
2 // We don't need to instantiate Wrapper<int> to check the
3 // foo(const Thingy&) overload.
4
5 template <class T> struct Incomplete;
6
7 template <typename T> class Wrapper
8 {
9 Incomplete<T> i;
10 };
11
12 template <typename T> struct Thingy
13 {
14 Thingy();
15 Thingy(const Wrapper<T>& v);
16
17 template <typename X> void foo(const Thingy<X>&);
18 void foo(const Thingy&);
19 };
20
21 int main()
22 {
23 Thingy<int> ap1;
24 Thingy<float> bp1;
25
26 ap1.foo(bp1);
27 }