+2005-12-23 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/24671
+ * pt.c (instantiate_template): Handle SFINAE.
+
2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* decl.c (grokdeclarator): Improve diagnostic for friend
/* Substitute template parameters. */
fndecl = tsubst (DECL_TEMPLATE_RESULT (gen_tmpl),
targ_ptr, complain, gen_tmpl);
+ if (fndecl == error_mark_node)
+ return error_mark_node;
/* Now we know the specialization, compute access previously
deferred. */
+2005-12-23 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/24671
+ * g++.dg/template/sfinae3.C: New test.
+
2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* g++.dg/other/friend4.C: New test.
--- /dev/null
+// PR c++/24671
+// { dg-options "" }
+
+template<typename> struct A
+{
+ typedef int X;
+ static const int i = 0;
+};
+
+template<typename> struct B
+{
+ B(const B&); // { dg-error "candidate" }
+ typedef typename A<char[A<B>::i]>::X Y;
+ template<typename T> B(T, Y); // { dg-error "call" }
+};
+
+B<int> b(0,0);