Fog Creek Software
Discussion Board


Has anybody used the <hash_map> STL ? Though MSDN has a help topic on <hash_map>, i cannot find the include file. It has been authored by P.J.Plauger. I downloaded a copy of the STL from SGI's download site. However, the <hash_map> template is different from that mentioned in MSDN.

Wednesday, February 12, 2003

<hash_map> doesn't seem that well supported.

Certainly MS doesn't support it, and it seems fairly patchy on linux. At the moment the system I work on ( a distributed telecoms sim) has a #define HASH_MAP which is used to define it to whatever the architecture/machine in question supports. Funnily enough, this usually seems to default to map!

regards, treefrog

Wednesday, February 12, 2003

Is a hash_map based on Amsterdam?

Wednesday, February 12, 2003

<hash_map> is *not* part of the C++ standard. According to Scott Meyers in "Effective STL", this is because the standards committee didn't want to delay the standard any more by trying to include everything.

There are two major implementations that have defined hashing containers - SGI (STLport) and Dinkumware (which ships with Visual C++). Both are, of course, incompatable with each other.

Wednesday, February 12, 2003

Our C++ toolkit has hashmaps,  hashtables, and hashsets.  See


Wednesday, February 12, 2003

Thanks! The templates I downloaded from SGI are not compatible with MSFT's. Lots of compilation problems.

Wednesday, February 12, 2003

Theres some discussion of the issue here:

The author recommends using the associative array std::map.

Ged Byrne
Thursday, February 13, 2003

*  Recent Topics

*  Fog Creek Home