* pt.c (check_explicit_specialization): When reverting a static
member function, also remove the `this' parameter from
last_function_parms.
From-SVN: r18704
+Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
+
+ * pt.c (check_explicit_specialization): When reverting a static
+ member function, also remove the `this' parameter from
+ last_function_parms.
+
Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
}
else if (DECL_STATIC_FUNCTION_P (tmpl)
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (decl))
- revert_static_member_fn (&decl, 0, 0);
+ {
+ revert_static_member_fn (&decl, 0, 0);
+ last_function_parms = TREE_CHAIN (last_function_parms);
+ }
/* Mangle the function name appropriately. Note that we do
not mangle specializations of non-template member
--- /dev/null
+extern "C" void abort();
+
+template <class T>
+class A
+{
+ public:
+ static int foo(int);
+};
+
+template <>
+int A<int>::foo(int i)
+{
+ return i;
+}
+
+
+int main()
+{
+ if (A<int>::foo(22) != 22)
+ abort();
+}