This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16972] New: template specialization rejected
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2004 19:30:10 -0000
- Subject: [Bug c++/16972] New: template specialization rejected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Trying to compile the following code snippet, I get an error message:
==================================================
template<int> struct A
{
template<typename> void foo();
};
template<> template<typename> void A<0>::foo() {}
==================================================
bug.cc:6: error: template-id `foo<>' for `void A<0>::foo()' does not match any
template declaration
bug.cc:6: error: invalid function declaration
I think the code is valid, though I'm not 100% sure. At least icc accepts it.
Might be related to PR 14379.
--
Summary: template specialization rejected
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16972