Boost logo

Boost :

Subject: Re: [boost] [config] gcc and <unordered_set> vs <ext/hash_set>
From: Juergen Hunold (juergen.hunold_at_[hidden])
Date: 2008-12-16 14:56:37

Hi John !

On Tuesday 16 December 2008, John Maddock wrote:
> Folks, Dave A. asked for a config macro to detect the presence of std
> conforming <unordered_set> and <unordered_map>.

This would be great.

> However, I've run into an unexpected issue: it appears that with
> gcc-4.3.x you cannot include both <unordered_set> and <ext/hash_set>
> as attempting to do so leads to endless errors inside the <ext/*>
> headers :-(
> Including either one of the headers is just fine though.

But the <unordered_*> headers are only available with -std=c++0x.

> So... how should we handled this? Not define BOOST_HAS_HASH when
> <unordered_set> *is* available?

We don't use <hash_*> at the moment, so im +-0 with this idea.

> As far as I can tell the only library effected by this change would
> be Boost.Serialization which would lose has_set support in gcc's
> c++0x mode. How do folks feel about that?

I remember that Dave was trying to eliminate the warnings from the BGL.
<hash_set> is used in boost/graph/adjacency_list.hpp, too.
I've disabled them for my project with BOOST_NO_HASH.
I don't care about them, but there may be projects around using them.

A short grep finds:
./boost/pending/container_traits.hpp:25:# include <hash_set>
./boost/pending/container_traits.hpp:30:# include <hash_map>
./boost/graph/adjacency_list.hpp:27:# include <hash_set>



* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        !
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

Boost list run by bdawes at, gregod at, cpdaniel at, john at