Commit 220dd8ca by Jason Merrill

re PR c++/8660 (template overloading ICE in tsubst_expr, at cp/pt.c:7644)

        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
parent 5b8e011c
// 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> (); }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
struct gorf { struct gorf {
int stuff; int stuff;
void snarf(); void snarf(); // ERROR -
}; };
template <class T> void gorf::snarf() { return; } // ERROR - template <class T> void gorf::snarf() { return; } // ERROR -
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment