This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Is std::tr1::unordered_map supposed to be working yet?
- From: random at bubblescope dot net
- To: paul dot leopardi at unsw dot edu dot au
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 18 Aug 2005 11:56:04 +0100
- Subject: Re: Is std::tr1::unordered_map supposed to be working yet?
- References: <200508181259.30615.leopardi@bigpond.net.au>
Paul C. Leopardi wrote:
>Hi,
>Two related questions.
>
>1. Is the difference in interface between __gnu_cxx::hash_map and
>std::tr1::unordered_map documented anywhere? Does the fact that I can't find
>any such gcc - specific documentation mean that std::tr1::unordered_map is a
>trivial drop-in replacement for __gnu_cxx::hash_map ?
>
>
>
Unfortunatly it's not. There isn't explicit differences documented
either. Documentation for tr1::unordered_map is contained in
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1745.pdf
If you get a copy of the complete g++ source code, then look in
libstdc++-v3/testsuite/tr1/6_containers/ you'll find the testsuite for
the unordered containers, which should at least show the basics of how
they work, although I'll admit not documented.
>2. I've been trying to use std::tr1::unordered_map as a replacement for
>__gnu_cxx::hash_map, with gcc version 4.0.2 20050728 (prerelease), and have
>encountered errors. Is this mailing list the correct place to check to see if
>I am using std::tr1::unordered_map correctly, and to check that it should
>work with gcc version 4.0.2 20050728 (prerelease)?
>
>
>
I believe it is, although it's fairly new, so don't be too suprised if
you don't get too many replies :) Unfortunatly, as I say, it's not
designed as a drop-in replacement. It would definatly be advisable to
move toward using it however, as except in extreme cases bug reports for
__gnu_cxx::hash_map are being ignored, and it's going to be phased out
in the not-too-distant future. Any problems with tr1::unordered_map have
a much better change of being fixed :)
Chris