PR c++/18962
* pt.c (check_explicit_specialization): Use the argument list from
the definition in a template function specialization definition.
gcc/testsuite/ChangeLog:
* g++.dg/template/spec19.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92552
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-12-23 Alexandre Oliva <aoliva@redhat.com>
+
+ PR c++/18962
+ * pt.c (check_explicit_specialization): Use the argument list from
+ the definition in a template function specialization definition.
+
2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/18733
DECL_SOURCE_LOCATION (tmpl) = DECL_SOURCE_LOCATION (decl);
DECL_SOURCE_LOCATION (DECL_TEMPLATE_RESULT (tmpl))
= DECL_SOURCE_LOCATION (decl);
+ /* We want to use the argument list specified in the
+ definition, not in the original declaration. */
+ DECL_ARGUMENTS (DECL_TEMPLATE_RESULT (tmpl))
+ = DECL_ARGUMENTS (decl);
}
return tmpl;
}
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
+ * g++.dg/template/spec19.C: New.
+
+2004-12-23 Alexandre Oliva <aoliva@redhat.com>
+
PR target/16891
* gcc.dg/empty2.c: New.
--- /dev/null
+// PR c++/18962
+
+template<class T1,int N1>
+class Class
+{
+public:
+ template <class T2,int N2>
+ void function( const Class<T2,N2>& );
+};
+
+template<>
+template<class T2,int N2>
+void Class<int,1>::function( const Class<T2,N2>& param )
+{
+ param; // make sure we use the argument list from the definition.
+}
+
+int main()
+{
+ Class<int,1> instance;
+ Class<char,2> param;
+ instance.function( param );
+}