Compiler bug?

Nathan Myers ncm-nospam@cantrip.org
Tue Apr 8 08:51:00 GMT 2003


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@cantrip.org



More information about the Libstdc++ mailing list