
on Tue Dec 16 2008, Juergen Hunold <juergen.hunold-AT-ivembh.de> wrote:
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.
Huh, good point. Too bad you have to set a compiler flag for that one.
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>
Yeah. Or maybe we should just use boost::unordered in future. It's hard to imagine that any of these projects have docs so specific about the container used that it would be a problem. -- Dave Abrahams BoostPro Computing http://www.boostpro.com