www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - (SGI) STL set: typename can only be used in templates

↑ ↓ ← Christof Meerwald <cmeerw web.de> writes:
Here is a simple test program (using the DM bundled SGI STL):

#include <set.h>

int main(int argc, char *argv[])
{
  set<int> s;
  s.erase(s.begin(), s.end());

  return 0;
}
// c:\dm\stl\stl_set.h(177) : Error: typename can only be used in templates


Just in case, here is the piece of code causing the problem in stl_set.h:
  void erase(iterator __first, iterator __last) {
    typedef typename _Rep_type::iterator _Rep_iterator;


bye, Christof

-- 
http://cmeerw.cjb.net                          Jabber: cmeerw jabber.at
mailto cmeerw at web.de                   ICQ: 93773535, Yahoo!: cmeerw

...and what have you contributed to the Net?
Oct 23 2001
↑ ↓ Jan Knepper <jan smartsoft.cc> writes:
There is a group news://news.digitalmars.com/c++.stl.sgi for SGI STL...
Jan



Christof Meerwald wrote:

 Here is a simple test program (using the DM bundled SGI STL):

 #include <set.h>

 int main(int argc, char *argv[])
 {
   set<int> s;
   s.erase(s.begin(), s.end());

   return 0;
 }
 // c:\dm\stl\stl_set.h(177) : Error: typename can only be used in templates

 Just in case, here is the piece of code causing the problem in stl_set.h:
   void erase(iterator __first, iterator __last) {
     typedef typename _Rep_type::iterator _Rep_iterator;

 bye, Christof

 --
 http://cmeerw.cjb.net                          Jabber: cmeerw jabber.at
 mailto cmeerw at web.de                   ICQ: 93773535, Yahoo!: cmeerw

 ...and what have you contributed to the Net?

Oct 23 2001
↑ ↓ Christof Meerwald <cmeerw web.de> writes:
On Tue, 23 Oct 2001 18:53:17 -0400, Jan Knepper wrote:
 There is a group news://news.digitalmars.com/c++.stl.sgi for SGI STL...

Yes, but as I think it is a compiler bug (and not a problem with the SGI STL implementation), I have chosen to post it here. I was only too lazy to come up with a non STL-based test-case like this one: template<class T> struct A { void f() { typedef typename T::B B; } }; template<class T> struct C { typedef T B; }; int main(int argc, char *argv[]) { A<C<int> > a; a.f(); return 0; } bye, Christof -- http://cmeerw.cjb.net Jabber: cmeerw jabber.at mailto cmeerw at web.de ICQ: 93773535, Yahoo!: cmeerw ...and what have you contributed to the Net?
Oct 23 2001
↑ ↓ Jan Knepper <jan smartsoft.cc> writes:
Christof Meerwald wrote:

 Yes, but as I think it is a compiler bug (and not a problem with the SGI STL
 implementation), I have chosen to post it here.

Doesn't really matter. You can post where you want. <g> I guess a good thing might be to create c++.bugs Will think about that one. Jan
Oct 23 2001
↑ ↓ → Heinz Saathoff <hsaat bre.ipnet.de> writes:
Jan Knepper schrieb...
 I guess a good thing might be to create c++.bugs
 Will think about that one.

Don't create another group! We already have too much groups IMO. Heinz
Oct 24 2001