This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
problem with template arguments to templates
- To: egcs-bugs at cygnus dot com
- Subject: problem with template arguments to templates
- From: David Mazieres <dm at reeducation-labor dot lcs dot mit dot edu>
- Date: Wed, 10 Jun 1998 16:20:53 -0400 (EDT)
Using:
gcc version egcs-2.91.40 19980610 (gcc2 ss-980502 experimental)
There seems to be a problem with inferring arguments to template
template parameters. The following program does not compile.
Of the two templates, "temp2" (included for comparison) works fine.
However, temp1 gives the following error:
ta.C:5: template parameters not used in partial specialization:
ta.C:5: `T'
Thanks,
David
--
template<class M, class T> struct temp2;
template<template<class> class M, class T> struct temp2<M<T>, T> {};
template<class M> struct temp1;
template<template<class> class M, class T> struct temp1<M<T> > {};