OSDN Git Service

827e3d80a7c906dede583b9f60ee134586d9f711
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / overload7.C
1 // { dg-do assemble  }
2
3 // Adapted from testcase by Corey Kosak <kosak@cs.cmu.edu>
4
5 template<class T>
6 struct moo_t {
7   struct cow_t {};
8 };
9
10 template<class T> void foo(typename moo_t<T>::cow_t) {}
11
12 template<class T> void foo(moo_t<T>) {
13   typename moo_t<T>::cow_t p;
14   foo(p); // { dg-bogus "" "" { xfail *-*-* } }  - no matching function for call - 
15 }
16
17 int main() {
18   moo_t<int> x;
19   foo(x); // { dg-bogus "" "" { xfail *-*-* } }  - instantiated from here - 
20 }