473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

hash_map question

On http://www.sgi.com/tech/stl/hash_map.html it says that hash_map is
only an extension of the SGI implementation, not a part of the C++
standard. But in g++ 4.1.3 I can manage it to work using the header
<ext/hash_mapand the namespace __gnu_cxx. So, it is present in more
implementations, not just SGI. Is this a thing I can trust in? Will I
always find hash_map on all new g++ versions? Should I care about
portability or it is safe to use it?
Feb 16 '08 #1
1 1540
Stefan Istrate wrote:
On http://www.sgi.com/tech/stl/hash_map.html it says that hash_map is
only an extension of the SGI implementation, not a part of the C++
standard. But in g++ 4.1.3 I can manage it to work using the header
<ext/hash_mapand the namespace __gnu_cxx. So, it is present in more
implementations, not just SGI. Is this a thing I can trust in? Will I
always find hash_map on all new g++ versions? Should I care about
portability or it is safe to use it?
Not if you want maximum portability. hash_map will be in the next
revision of the standard.

--
Ian Collins.
Feb 16 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Christian Meier | last post by:
Hello, Yes, I know that hash maps aren't in the standard. But I couldn't find any better newsgroup for this post. (or is there an SGI library newsgroup?) I am currently testing the hash_map...
5
by: peter_k | last post by:
Hi I've defined hash_map in my code using this: ------------------------------------------- #include <string> #include <hash_map.h> & namespace __gnu_cxx {
1
by: anjangoswami06 | last post by:
Hi, I am interested to know how it is possible to update the data type with "insert" with stl hash_map. Suppose we have, hash_map<const char *, MyDataType, hash_compare<const char*,...
4
by: newbie | last post by:
For STL containers like hash_map, need I explicitly call clear() before delete()ing it? e.g. hash_map<string, MyClass**my_map; my_map = new (hash_map<string, MyClass*>); .... ....
11
by: aaragon | last post by:
Hello everyone, I have a VERY BIG set of double values that I want to map to intervals so I thought a clever way to do this was using a hash table. Let's say that I want to map all double values...
1
by: Axel Gallus | last post by:
Hello, i have a question concerning STL non-standard hash_maps under Visual Studio 2005: Microsoft STL requires a "hash_compare" object for hash_maps: template <class Key, class Type, class...
2
by: Amit Bhatia | last post by:
Hi, I am trying to use hash maps from STL on gcc 3.3 as follows: #ifndef NODE_H #define NODE_H #include <ext/hash_map> #include "node_hasher.h" class Node; typedef hash_map<pair<int,int>,...
5
by: frankw | last post by:
Hi, I have a hash_map with string as key and an object pointer as value. the object is like class{ public: float a; float b; ...
2
by: marek.vondrak | last post by:
Hi, I am wondering if there are any functional differences between SGI's hash_map and tr1's unordered_map. Can these two containers be interchanged? What would it take to switch from hash_map to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.