blob: 27c6974c10ad9ecb987eacf1d89cd4ed2e0ace28 [file] [log] [blame]
// { dg-do assemble }
// 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) {} // { dg-error "candidate template ignored: couldn't infer" }
template<class T> void foo(moo_t<T>) { // { dg-error "candidate template ignored: could not match" }
typename moo_t<T>::cow_t p;
foo(p); // { dg-error "no matching function for call to 'foo'" }
}
int main() {
moo_t<int> x;
foo(x); // { dg-error "in instantiation of function template specialization" }
}