This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]