public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* SGI STL
@ 1998-02-12  8:00 Anand Raman
  1998-02-12 18:02 ` Joe Buck
  1998-02-12 20:07 ` Joe Buck
  0 siblings, 2 replies; 7+ messages in thread
From: Anand Raman @ 1998-02-12  8:00 UTC (permalink / raw)
  To: egcs

Hi 

I am trying to compile some code using the SGI STL with egcs 1.01.

In particular I am using hash_map from the STL which is not part of
the standard library in egcs.  Unfortunately, it comes up with a whole
lot of errors and template functions that the loader is unable to
find.

Can someone help me please.  Here is a simple program that doesn't
compile:

#include <iostream.h>
#include <string>
#include "hash_map"

struct eqstr {
  bool operator()(string s1, string s2) const {
    return s1 == s2;
  }
};

main() {
  hash_map<string ,int,hash<string>,eqstr> ords;

  ords["one"] = 1;
  cout <<ords["one"] <<endl;

  return 0;
}

However, if I replace string by "const char *" it works.  Why isn't
the hash function overloaded for string, which I would have guessed
would pretty much be a basic type?

Also, how come I get the following two warning messages:

/usr/local/include/g++/stl_hashtable.h:150: warning: decimal integer constant is so large that it is unsigned
/usr/local/include/g++/stl_hashtable.h:150: warning: decimal integer constant is so large that it is unsigned

when the constants are in fact declared already as unsigned long!

Any help in this regard will be greatly appreciated.

Many thanks.

- &

^ permalink raw reply	[flat|nested] 7+ messages in thread
* SGI STL
@ 1999-02-19 19:52 Bob McWhirter
       [not found] ` < Pine.LNX.3.96.990219224940.7438J-100000@exeter.exeter.org >
  1999-02-28 22:53 ` Bob McWhirter
  0 siblings, 2 replies; 7+ messages in thread
From: Bob McWhirter @ 1999-02-19 19:52 UTC (permalink / raw)
  To: egcs

Howdy--

Since someone said that the latest STL from SGI
probably won't be in egcs-1.1.2, I was wondering
a few things:

	Is it a painless retrofit to put
	the current STL on a current egcs?

	If not, is someone working on it, and
	how do I volunteer to help?

The STL is quite important to me, and I'm willing
to do what I can to make it play friendly with
egcs.

I'm looking more at hacking the SGI STL, as opposed
to jumping into the GNU (?) standard-library effort
which seems to be building a conforming STL/Standard Lib
from scratch.

Thanks!

-Bob M.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1999-02-28 22:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-12  8:00 SGI STL Anand Raman
1998-02-12 18:02 ` Joe Buck
1998-02-12 20:07 ` Joe Buck
1999-02-19 19:52 Bob McWhirter
     [not found] ` < Pine.LNX.3.96.990219224940.7438J-100000@exeter.exeter.org >
1999-02-20  1:45   ` Martin v. Loewis
1999-02-28 22:53     ` Martin v. Loewis
1999-02-28 22:53 ` Bob McWhirter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).