PR c++/8660
* decl2.c (check_classfn): A member template only matches a
member template.
[[Split portion of a mixed commit.]]
From-SVN: r64167.2
--- /dev/null
+// PR c++/8660
+// Bug: we were treating the definition of the non-template as a definition
+// of the template, which broke.
+
+struct BadgerBuf
+{
+ void ReadPod();
+ template<class B>
+ void ReadPod();
+};
+
+void BadgerBuf::ReadPod ()
+ { ReadPod<int> (); }
struct gorf {
int stuff;
- void snarf();
+ void snarf(); // ERROR -
};
template <class T> void gorf::snarf() { return; } // ERROR -