help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How does one use hash_map?


From: Jeffrey Holle
Subject: How does one use hash_map?
Date: Sun, 16 Mar 2003 11:40:29 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212

I have gcc 3.2.2.

I have an app that is successfully using map, now I want to compare
performance with hash_map.

I found that including:
   #include <ext/hash_map>
works and I can express std::hash_map without producing an error.

However, I can't find std::hash<> (with or without the "std::")

If I express by typdef as:
   typedef std::hash_map<Vertex,Vertex_Datum> Vertex_Data;

I get:
  ISO C++ forbids declaration of `hash_map' with no type
  template-id `hash_map<Vertex, BGLLayout::Vertex_Datum>' used as
descriptor.

I suspect that this error is caused by a few of missing default template
 parameters, actually 3, including hash<_Key>....

Perhaps I should switch to SGI or STLPort?







reply via email to

[Prev in Thread] Current Thread [Next in Thread]