aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/overload11.C
blob: d7b0a7c9f1c323523ed17908860cb784d3e13a38 (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
27
// PR c++/39413
// We don't need to instantiate Wrapper<int> to check the
// foo(const Thingy&) overload.

template <class T> struct Incomplete;

template <typename T> class Wrapper
{
  Incomplete<T> i;
};

template <typename T> struct Thingy
{
  Thingy();
  Thingy(const Wrapper<T>& v);

  template <typename X> void foo(const Thingy<X>&);
  void foo(const Thingy&);
};

int main()
{
    Thingy<int> ap1;
    Thingy<float> bp1;

    ap1.foo(bp1);
}