This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15359] errors specializing a template class of a template class
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2004 17:40:00 -0000
- Subject: [Bug c++/15359] errors specializing a template class of a template class
- References: <20040509235749.15359.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From igodard at pacbell dot net 2004-05-10 17:39 -------
Specializing outside doesn't work either:
template<typename E>
class F {
public:
template<typename G>
class H {
public:
};
H<E> h;
};
template<>
class H<bool> {
public:
bool b;
};
template<typename E>
F<E>::H<int> {
public:
int i;
};
F<int>::H<char> {
public:
char c;
};
template<>
F<int>::H<char> {
public:
char c;
};
int main() {
return 0;
}
gets me:
~/ootbc/common/test/src$ g++ foo.cc
foo.cc:12: error: `H' is not a template
foo.cc:12: error: explicit specialization of non-template `H'
foo.cc:18: error: expected unqualified-id before '{' token
foo.cc:18: error: expected `;' before '{' token
foo.cc:23: error: expected unqualified-id before '{' token
foo.cc:23: error: expected `,' or `;' before '{' token
foo.cc:29: error: expected unqualified-id before '{' token
foo.cc:29: error: expected `;' before '{' token
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15359