SC 5.0 compiler

SC 5.0 compiler

Post by Johannes Beh » Wed, 24 Mar 1999 04:00:00



Hi,

I know, that's not a newsgroup for SC compiler bug reports, but
I haven't found one.

OK, I have tried to compile the following piece of code
on a Sparc Ultra 10 (SunOS 5.6) with SC 5.0:

---8<------------------------------------------------------------
#include <list>
using namespace std;

template <class TA> class A { TA _value; };

template <class TB> class B : public A<list<TB> > {};

main (int argc, char **argv)
{
  B<int> foo;

Quote:}

---8<------------------------------------------------------------        

but all I got was:

---8<------------------------------------------------------------
"SCbug.cpp", line 134: Error: The type "__rwstd::__rw_basis<int,
std::Allocator>" is incomplete.
"SCbug.cpp", line 4:     Where: While specializing "std::list<int>".
"SCbug.cpp", line 4:     Where: Specialized in A<std::list<int>>.
"SCbug.cpp", line 6:     Where: Specialized in B<int>.
"SCbug.cpp", line 10:     Where: Specialized in non-template code.
1 Error(s) detected.
---8<------------------------------------------------------------        

I can compile the same piece with gcc2.8.1, NCC 7.2 on IRIX, and
VC 5.0 so I belief it's correct C++.

Is it really a compiler bug ? I tried the STLport stl impl.
instead of the sun stl impl. with the same result.

Any Idea ?
  Johannes