[Top][All Lists]

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

Re: hash_map include, how?

From: Paulo Matos
Subject: Re: hash_map include, how?
Date: 2 Aug 2006 08:33:37 -0700
User-agent: G2/0.2

Bernd Strieder wrote:
> hash_map is a deliberate extension provided by libstdc++. The correct
> way will be #include <hash_map> after C++0x is out. If #include
> <hash_map> would be used now, but in C++0x substantial changes would
> have to be done, this would be very annoying. By moving it to ext/ both
> versions could exist for a smooth transition. Compare to the iostream.h
> to iostream transition on the introduction of namespaces.
> I think hash_map has been included in TR1 for C++0x, so #include
> <tr1/hash_map> could have its merits, too. But TR1 is only a temporary
> story. So code using it would have its disposal time already set.
> If you use hash_map now, your code will be depending on non-portable
> non-standard extensions, that might be changing without notice between
> compiler releases, if you prefer the worst-case to deal with.

Thanks for the explanation... So, I guess currently, the way to go is
#include <ext/hash_map>

using __gnu_cxx::hash_map;

on g++ 4.1.1 at least, right?

Rest assured that with your explanation I got it... my software will
not be portable... probably not even between different versions. :-)

> Bernd Strieder

reply via email to

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