blob: 97bc58ce04cb8f35018c13d6f19ccca0d7579c30 [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: failed template argument deduction" }
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" }
}