This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11343] New: Partial specialization doesn't work with template parameters, that are templates itself
- From: "duma at gorodok dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2003 03:32:19 -0000
- Subject: [Bug c++/11343] New: Partial specialization doesn't work with template parameters, that are templates itself
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11343
Summary: Partial specialization doesn't work with template
parameters, that are templates itself
Product: gcc
Version: 3.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: duma at gorodok dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-redhat-linux
GCC host triplet: i686-redhat-linux
GCC target triplet: i686-redhat-linux
Partial specialization doesn't work with template parameters, that are
templates itself
//first test case
template <unsigned Width>
class A
{
public:
unsigned setA();
};
template <unsigned W, template <unsigned> class C>
class B:public C<W>
{
public:
unsigned setB();
};
//next specialization is not accepted
template <unsigned V>
unsigned B<V, A>::setB() {return 11;}
//second test case
template <unsigned Width, unsigned Y>
class C
{
public:
unsigned setA();
};
template <template <unsigned, unsigned> class F, unsigned W, unsigned Y >
class D:public F<W, Y>
{
public:
unsigned setD();
};
//next specialization is not accepted
template <template<unsigned, unsigned> class F, unsigned V>
unsigned D<F, V, 1>::setD() {return 11;}