This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Compiler bug?
- From: Nathan Myers <ncm-nospam at cantrip dot org>
- To: libstdc++ at gcc dot gnu dot org
- Date: Tue, 8 Apr 2003 01:52:31 -0700
- Subject: Compiler bug?
Is this a compiler bug? I have
template<typename T>
struct Outer
{
struct Inner
{
int c;
static int s[];
};
};
template<typename T>
int Outer<T>::Inner::s[sizeof(Inner)];
extern template class Outer<char>;
and gcc-2.95, gcc-3.2, and gcc-3.3 say:
bug.cc: In instantiation of `Outer<char>::Inner':
bug.cc:14: instantiated from here
bug.cc:12: `sizeof' applied to incomplete type `Outer<char>::Inner'
Outer<>::Inner doesn't look incomplete to me.
Nathan Myers
ncm-nospam at cantrip dot org