c++ - (SGI) STL set: typename can only be used in templates
- Christof Meerwald <cmeerw web.de> Oct 23 2001
- Jan Knepper <jan smartsoft.cc> Oct 23 2001
- Christof Meerwald <cmeerw web.de> Oct 23 2001
- Jan Knepper <jan smartsoft.cc> Oct 23 2001
- Heinz Saathoff <hsaat bre.ipnet.de> Oct 24 2001
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
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
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
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
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








Heinz Saathoff <hsaat bre.ipnet.de>