summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/overload7.C
blob: 6f5dff0a2ffd1392e47407d513c2d6c4574dbdee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do assemble  }
// { dg-prune-output "note" }

// Adapted from testcase by Corey Kosak <kosak@cs.cmu.edu>

template<class T>
struct moo_t {
  struct cow_t {};
};

template<class T> void foo(typename moo_t<T>::cow_t) {}

template<class T> void foo(moo_t<T>) {
  typename moo_t<T>::cow_t p;
  foo(p); // { dg-bogus "" "" { xfail *-*-* } }  - no matching function for call - 
}

int main() {
  moo_t<int> x;
  foo(x); // { dg-bogus "" "" { xfail *-*-* } }  - instantiated from here - 
}